diff options
author | jkim <jkim@FreeBSD.org> | 2007-03-30 18:27:57 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2007-03-30 18:27:57 +0000 |
commit | 4f1754c08d27088022ad18cfbcd14c64ffa33bd9 (patch) | |
tree | ca5d952040874059669a3ec81bdaf5fbc3ec2c85 /sys | |
parent | b756d10ae05259e831ed4fcfa0b7a9d765362ac5 (diff) | |
download | FreeBSD-src-4f1754c08d27088022ad18cfbcd14c64ffa33bd9.zip FreeBSD-src-4f1754c08d27088022ad18cfbcd14c64ffa33bd9.tar.gz |
Use the same wisdom of sys/i386/i386/support.s 1.97 to remove obfuscation.
Pointed out by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/support.S | 16 | ||||
-rw-r--r-- | sys/i386/i386/support.s | 17 |
2 files changed, 16 insertions, 17 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index a933a7b..d6b5f3d 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -690,12 +690,6 @@ NON_GPROF_ENTRY(__bb_init_func) movq %rdi,bbhead NON_GPROF_RET -#if defined(SMP) || !defined(_KERNEL) -#define MPLOCKED lock ; -#else -#define MPLOCKED -#endif - .text futex_fault: @@ -713,7 +707,10 @@ ENTRY(futex_xchgl) cmpq %rax, %rsi ja futex_fault - MPLOCKED xchgl %edi, (%rsi) +#if defined(SMP) || !defined(_KERNEL) + lock +#endif + xchgl %edi, (%rsi) movl %edi, (%rdx) xorl %eax, %eax movq %rax, PCB_ONFAULT(%r11) @@ -728,7 +725,10 @@ ENTRY(futex_addl) cmpq %rax, %rsi ja futex_fault - MPLOCKED xaddl %edi, (%rsi) +#if defined(SMP) || !defined(_KERNEL) + lock +#endif + xaddl %edi, (%rsi) movl %edi, (%rdx) xorl %eax, %eax movq %rax, PCB_ONFAULT(%r11) diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 4083c03..9b2f5f0 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -1524,12 +1524,6 @@ ENTRY(longjmp) bbhead: .long 0 -#if defined(SMP) || !defined(_KERNEL) -#define MPLOCKED lock ; -#else -#define MPLOCKED -#endif - .text NON_GPROF_ENTRY(__bb_init_func) movl 4(%esp),%eax @@ -1557,7 +1551,10 @@ ENTRY(futex_xchgl) cmpl $VM_MAXUSER_ADDRESS,%edx ja futex_fault - MPLOCKED xchgl %eax, (%edx) +#if defined(SMP) || !defined(_KERNEL) + lock +#endif + xchgl %eax, (%edx) movl 0xc(%esp), %edx movl %eax, (%edx) xorl %eax, %eax @@ -1575,7 +1572,10 @@ ENTRY(futex_addl) cmpl $VM_MAXUSER_ADDRESS,%edx ja futex_fault - MPLOCKED xaddl %eax, (%edx) +#if defined(SMP) || !defined(_KERNEL) + lock +#endif + xaddl %eax, (%edx) movl 0xc(%esp), %edx movl %eax, (%edx) xorl %eax, %eax @@ -1583,4 +1583,3 @@ ENTRY(futex_addl) movl PCPU(CURPCB), %edx movl $0, PCB_ONFAULT(%edx) ret - |