1
1
openmpi/opal/asm/base/X86_64.asm
Gilles Gouaillardet af0b5cffb4 asm: rename the AMD64 into X86_64
in this context, AMD64 really means amd64 or em64t, so let's
rename this into X86_64 in order to avoid any confusion

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2017-02-27 15:10:50 +09:00

53 строки
865 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)