6691e55d30
as I understand how that one works and don't really understand what was in the amd64 code (which was copied from before I started working on the inline assembly). This fixes the race condition we were seeing on PGI causing test failures * sync non-inline assembly with inline assembly version This needs to go to the v1.0 branch This commit was SVN r9539.
53 строки
871 B
NASM
53 строки
871 B
NASM
START_FILE
|
|
TEXT
|
|
|
|
START_FUNC(opal_atomic_mb)
|
|
pushq %rbp
|
|
movq %rsp, %rbp
|
|
leave
|
|
ret
|
|
END_FUNC(opal_atomic_mb)
|
|
|
|
|
|
START_FUNC(opal_atomic_rmb)
|
|
pushq %rbp
|
|
movq %rsp, %rbp
|
|
leave
|
|
ret
|
|
END_FUNC(opal_atomic_rmb)
|
|
|
|
|
|
START_FUNC(opal_atomic_wmb)
|
|
pushq %rbp
|
|
movq %rsp, %rbp
|
|
leave
|
|
ret
|
|
END_FUNC(opal_atomic_wmb)
|
|
|
|
|
|
START_FUNC(opal_atomic_cmpset_32)
|
|
movl %esi, %eax
|
|
lock; cmpxchgl %edx,(%rdi)
|
|
sete %dl
|
|
movzbl %dl, %eax
|
|
ret
|
|
END_FUNC(opal_atomic_cmpset_32)
|
|
|
|
|
|
START_FUNC(opal_atomic_cmpset_64)
|
|
movq %rsi, %rax
|
|
lock; cmpxchgq %rdx,(%rdi)
|
|
sete %dl
|
|
movzbl %dl, %eax
|
|
ret
|
|
END_FUNC(opal_atomic_cmpset_64)
|
|
|
|
|
|
START_FUNC(opal_sys_timer_get_cycles)
|
|
rdtsc
|
|
salq $32, %rdx
|
|
mov %eax, %eax
|
|
orq %rdx, %rax
|
|
ret
|
|
END_FUNC(opal_sys_timer_get_cycles)
|