File tree 2 files changed +28
-27
lines changed
2 files changed +28
-27
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#if defined(__sparcv9) || defined(__sparc)
10
10
11
- .section ".text"
12
- .align 8
13
- .skip 24
14
- .align 4
11
+ .section ".text"
12
+ .align 8
13
+ .skip 24
14
+ .align 4
15
15
16
- .global pg_atomic_cas
16
+ .global pg_atomic_cas
17
17
pg_atomic_cas:
18
- cas [%o0],%o2,%o1
19
- mov %o1,%o0
20
- retl
21
- nop
22
- .type pg_atomic_cas,2
23
- .size pg_atomic_cas,(.-pg_atomic_cas)
18
+
19
+ cas [%o0],%o2,%o1
20
+ mov %o1,%o0
21
+ retl
22
+ nop
23
+ .type pg_atomic_cas,2
24
+ .size pg_atomic_cas,(.-pg_atomic_cas)
24
25
#endif
Original file line number Diff line number Diff line change 6
6
7
7
/ '/' is the comment for x86, while '!' is the comment for Sparc
8
8
9
- .file "tas.s"
9
+ .file "tas.s"
10
10
11
11
#if defined(__amd64)
12
- .code64
12
+ .code64
13
13
#endif
14
14
15
- .globl pg_atomic_cas
16
- .type pg_atomic_cas, @function
15
+ .globl pg_atomic_cas
16
+ .type pg_atomic_cas, @function
17
17
18
- .section .text , "ax"
19
- .align 16
18
+ .section .text , "ax"
19
+ .align 16
20
20
21
21
pg_atomic_cas:
22
22
#if defined(__amd64)
23
- movl %edx ,%eax
24
- lock
25
- cmpxchgl %esi ,(%rdi )
23
+ movl %edx ,%eax
24
+ lock
25
+ cmpxchgl %esi ,(%rdi )
26
26
#else
27
- movl 4 (%esp ), %edx
28
- movl 8 (%esp ), %ecx
29
- movl 12 (%esp ), %eax
30
- lock
31
- cmpxchgl %ecx , (%edx )
27
+ movl 4 (%esp ), %edx
28
+ movl 8 (%esp ), %ecx
29
+ movl 12 (%esp ), %eax
30
+ lock
31
+ cmpxchgl %ecx , (%edx )
32
32
#endif
33
- ret
34
- .size pg_atomic_cas, . - pg_atomic_cas
33
+ ret
34
+ .size pg_atomic_cas, . - pg_atomic_cas
You can’t perform that action at this time.
0 commit comments