OpenCores
URL https://opencores.org/ocsvn/or1k_soc_on_altera_embedded_dev_kit/or1k_soc_on_altera_embedded_dev_kit/trunk

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [arch/] [cris/] [arch-v32/] [lib/] [spinlock.S] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 xianfeng
;; Core of the spinlock implementation
2
;;
3
;; Copyright (C) 2004 Axis Communications AB.
4
;;
5
;; Author: Mikael Starvik
6
 
7
 
8
        .global cris_spin_lock
9
        .global cris_spin_trylock
10
 
11
        .text
12
 
13
cris_spin_lock:
14
        clearf  p
15
1:      test.d  [$r10]
16
        beq     1b
17
        clearf  p
18
        ax
19
        clear.d [$r10]
20
        bcs     1b
21
        clearf  p
22
        ret
23
        nop
24
 
25
cris_spin_trylock:
26
        clearf  p
27
1:      move.d  [$r10], $r11
28
        ax
29
        clear.d [$r10]
30
        bcs     1b
31
        clearf  p
32
        ret
33
        move.d  $r11,$r10

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.