Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/linux/linux_support.s
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
END(futex_orl_nosmap) | END(futex_orl_nosmap) | ||||
ENTRY(futex_orl_smap) | ENTRY(futex_orl_smap) | ||||
movq PCPU(CURPCB),%r8 | movq PCPU(CURPCB),%r8 | ||||
movq $futex_fault,PCB_ONFAULT(%r8) | movq $futex_fault,PCB_ONFAULT(%r8) | ||||
movq $VM_MAXUSER_ADDRESS-4,%rax | movq $VM_MAXUSER_ADDRESS-4,%rax | ||||
cmpq %rax,%rsi | cmpq %rax,%rsi | ||||
ja futex_fault | ja futex_fault | ||||
stac | |||||
movl (%rsi),%eax | movl (%rsi),%eax | ||||
1: movl %eax,%ecx | 1: movl %eax,%ecx | ||||
orl %edi,%ecx | orl %edi,%ecx | ||||
stac | |||||
#ifdef SMP | #ifdef SMP | ||||
lock | lock | ||||
#endif | #endif | ||||
cmpxchgl %ecx,(%rsi) | cmpxchgl %ecx,(%rsi) | ||||
clac | |||||
jnz 1b | jnz 1b | ||||
clac | |||||
movl %eax,(%rdx) | movl %eax,(%rdx) | ||||
xorl %eax,%eax | xorl %eax,%eax | ||||
movq %rax,PCB_ONFAULT(%r8) | movq %rax,PCB_ONFAULT(%r8) | ||||
ret | ret | ||||
END(futex_orl_smap) | END(futex_orl_smap) | ||||
ENTRY(futex_andl_nosmap) | ENTRY(futex_andl_nosmap) | ||||
movq PCPU(CURPCB),%r8 | movq PCPU(CURPCB),%r8 | ||||
Show All 16 Lines | |||||
END(futex_andl_nosmap) | END(futex_andl_nosmap) | ||||
ENTRY(futex_andl_smap) | ENTRY(futex_andl_smap) | ||||
movq PCPU(CURPCB),%r8 | movq PCPU(CURPCB),%r8 | ||||
movq $futex_fault,PCB_ONFAULT(%r8) | movq $futex_fault,PCB_ONFAULT(%r8) | ||||
movq $VM_MAXUSER_ADDRESS-4,%rax | movq $VM_MAXUSER_ADDRESS-4,%rax | ||||
cmpq %rax,%rsi | cmpq %rax,%rsi | ||||
ja futex_fault | ja futex_fault | ||||
stac | |||||
movl (%rsi),%eax | movl (%rsi),%eax | ||||
1: movl %eax,%ecx | 1: movl %eax,%ecx | ||||
andl %edi,%ecx | andl %edi,%ecx | ||||
stac | |||||
#ifdef SMP | #ifdef SMP | ||||
lock | lock | ||||
#endif | #endif | ||||
cmpxchgl %ecx,(%rsi) | cmpxchgl %ecx,(%rsi) | ||||
clac | |||||
jnz 1b | jnz 1b | ||||
clac | |||||
movl %eax,(%rdx) | movl %eax,(%rdx) | ||||
xorl %eax,%eax | xorl %eax,%eax | ||||
movq %rax,PCB_ONFAULT(%r8) | movq %rax,PCB_ONFAULT(%r8) | ||||
ret | ret | ||||
END(futex_andl_smap) | END(futex_andl_smap) | ||||
ENTRY(futex_xorl_nosmap) | ENTRY(futex_xorl_nosmap) | ||||
movq PCPU(CURPCB),%r8 | movq PCPU(CURPCB),%r8 | ||||
Show All 16 Lines | |||||
END(futex_xorl_nosmap) | END(futex_xorl_nosmap) | ||||
ENTRY(futex_xorl_smap) | ENTRY(futex_xorl_smap) | ||||
movq PCPU(CURPCB),%r8 | movq PCPU(CURPCB),%r8 | ||||
movq $futex_fault,PCB_ONFAULT(%r8) | movq $futex_fault,PCB_ONFAULT(%r8) | ||||
movq $VM_MAXUSER_ADDRESS-4,%rax | movq $VM_MAXUSER_ADDRESS-4,%rax | ||||
cmpq %rax,%rsi | cmpq %rax,%rsi | ||||
ja futex_fault | ja futex_fault | ||||
stac | |||||
movl (%rsi),%eax | movl (%rsi),%eax | ||||
1: movl %eax,%ecx | 1: movl %eax,%ecx | ||||
xorl %edi,%ecx | xorl %edi,%ecx | ||||
stac | |||||
#ifdef SMP | #ifdef SMP | ||||
lock | lock | ||||
#endif | #endif | ||||
cmpxchgl %ecx,(%rsi) | cmpxchgl %ecx,(%rsi) | ||||
clac | |||||
jnz 1b | jnz 1b | ||||
clac | |||||
movl %eax,(%rdx) | movl %eax,(%rdx) | ||||
xorl %eax,%eax | xorl %eax,%eax | ||||
movq %rax,PCB_ONFAULT(%r8) | movq %rax,PCB_ONFAULT(%r8) | ||||
ret | ret | ||||
END(futex_xorl_smap) | END(futex_xorl_smap) |