2005-02-10 03:06:54 +03:00
|
|
|
START_FILE
|
2005-01-27 04:39:55 +03:00
|
|
|
TEXT
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_mb)
|
2005-01-27 04:39:55 +03:00
|
|
|
pushq %rbp
|
|
|
|
movq %rsp, %rbp
|
|
|
|
leave
|
|
|
|
ret
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_mb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_rmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
pushq %rbp
|
|
|
|
movq %rsp, %rbp
|
|
|
|
leave
|
|
|
|
ret
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_rmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_wmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
pushq %rbp
|
|
|
|
movq %rsp, %rbp
|
|
|
|
leave
|
|
|
|
ret
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_wmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_32)
|
2006-04-06 05:23:33 +04:00
|
|
|
movl %esi, %eax
|
|
|
|
lock; cmpxchgl %edx,(%rdi)
|
|
|
|
sete %dl
|
|
|
|
movzbl %dl, %eax
|
|
|
|
ret
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_64)
|
2006-04-06 05:23:33 +04:00
|
|
|
movq %rsi, %rax
|
|
|
|
lock; cmpxchgq %rdx,(%rdi)
|
|
|
|
sete %dl
|
|
|
|
movzbl %dl, %eax
|
|
|
|
ret
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_64)
|
2005-08-24 02:07:56 +04:00
|
|
|
|
|
|
|
|
|
|
|
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)
|