diff options
author | Ori Bernstein <ori@eigenstate.org> | 2016-01-06 12:33:00 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2016-01-06 12:33:00 -0800 |
commit | 13b5870a91f904331fa58b396dd270716599dd98 (patch) | |
tree | bb27bb02ea960913b7eefc19f94acf9161306d43 /lib/thread | |
parent | f3c06e95f5a15488e1a99a272c3f0123dc5516a7 (diff) | |
download | mc-13b5870a91f904331fa58b396dd270716599dd98.tar.gz |
Fix or remove the other broken operations
Diffstat (limited to 'lib/thread')
-rw-r--r-- | lib/thread/atomic-impl+plan9-x64.s | 9 | ||||
-rw-r--r-- | lib/thread/atomic-impl+x64.s | 16 |
2 files changed, 12 insertions, 13 deletions
diff --git a/lib/thread/atomic-impl+plan9-x64.s b/lib/thread/atomic-impl+plan9-x64.s index 2b4f5dd..8765199 100644 --- a/lib/thread/atomic-impl+plan9-x64.s +++ b/lib/thread/atomic-impl+plan9-x64.s @@ -32,13 +32,16 @@ TEXT thread$xaddp+0(SB),1,$0 RET TEXT thread$xsub32+0(SB),1,$0 - LOCK; XADDL SI, (DI) + LOCK; XSUBL SI, (DI) + MOVL SI, AX RET TEXT thread$xsub64+0(SB),1,$0 - LOCK; XADDQ SI, (DI) + LOCK; XSUBQ SI, (DI) + MOVQ SI, AX RET TEXT thread$xsubp+0(SB),1,$0 - LOCK; XADDQ SI, (DI) + LOCK; XSUBQ SI, (DI) + MOVQ SI, AX RET TEXT thread$xcas32+0(SB),1,$0 diff --git a/lib/thread/atomic-impl+x64.s b/lib/thread/atomic-impl+x64.s index 8824ba2..43986bb 100644 --- a/lib/thread/atomic-impl+x64.s +++ b/lib/thread/atomic-impl+x64.s @@ -8,6 +8,7 @@ thread$xget64: thread$xgetp: movq (%rdi), %rax ret + .globl thread$xset32 thread$xset32: movl %esi, (%rdi) @@ -18,26 +19,20 @@ thread$xset64: thread$xsetp: movq %rsi, (%rdi) ret + .globl thread$xadd32 thread$xadd32: lock xaddl %esi, (%rdi) + movl %esi,%eax ret .globl thread$xadd64 .globl thread$xaddp thread$xadd64: thread$xaddp: lock xaddq %rsi, (%rdi) + movq %rsi,%rax ret -.globl thread$xsub32 -thread$xsub32: - lock xaddl %esi, (%rdi) - ret -.globl thread$xsub64 -.globl thread$xsubp -thread$xsub64: -thread$xsubp: - lock xaddq %rsi, (%rdi) - ret + .globl thread$xcas32 thread$xcas32: movl %esi, %eax @@ -50,6 +45,7 @@ thread$xcasp: movq %rsi, %rax lock cmpxchgq %rdx, (%rdi) ret + .globl thread$xchg32 thread$xchg32: movl %esi, %eax |