summaryrefslogtreecommitdiff
path: root/lib/thread/atomic-impl+x64.s
blob: 10f328161d93c8eea7a333925bd767d9c8e65270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.globl thread$xget32
thread$xget32:
	movl	(%rdi), %eax
	ret
.globl thread$xget64
thread$xget64:
	movq	(%rdi), %rax
	ret
.globl thread$xset32
thread$xset32:
	movl	%esi, (%rdi)
	ret
.globl thread$xset64
thread$xset64:
	movq	%rsi, (%rdi)
	ret
.globl thread$xadd32
thread$xadd32:
	lock xaddl	%esi, (%rdi)
	ret
.globl thread$xadd64
thread$xadd64:
	lock xaddq	%rsi, (%rdi)
	ret
.globl thread$xsub32
thread$xsub32:
	lock xaddl	%esi, (%rdi)
	ret
.globl thread$xsub64
thread$xsub64:
	lock xaddq	%rsi, (%rdi)
	ret
.globl thread$xcas32
thread$xcas32:
	movl	%esi, %eax
	lock cmpxchgl	%edx, (%rdi)
	ret
.globl thread$xcas64
thread$xcas64:
	movq	%rsi, %rax
	lock cmpxchgq	%rdx, (%rdi)
	ret
.globl thread$xchg32
thread$xchg32:
	movl	%esi, %eax
	lock xchgl	(%rdi), %eax
	ret
.globl thread$xchg64
thread$xchg64:
	movq	%rsi, %rax
	lock xchgq	(%rdi), %rax
	ret