aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-05 01:30:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:26 -0500
commit4bdf8bc4a15d4540d71db9fa01955db5edcf89ec (patch)
tree9df4b5960104a8143b00af27ae6474145c36c0b1 /arch/um/sys-x86_64
parentee56314b79039b669396ee04aac3e342cd2e5a1f (diff)
uml: borrow const.h techniques
Suggested by Geert Uytterhoeven - use const.h to get constants that are usable in both C and assembly. I can't include it directly since this code can't include kernel headers. const.h is also for numeric constants that can be typed by tacking a "UL" or similar on the end. The constants here have to be typed by casting them. So, the relevant parts of const.h are copied here and modified in order to allow the constants to be uncasted in assembly and casted in C. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r--arch/um/sys-x86_64/stub.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/sys-x86_64/stub.S b/arch/um/sys-x86_64/stub.S
index 4afe204a6af7..568768763155 100644
--- a/arch/um/sys-x86_64/stub.S
+++ b/arch/um/sys-x86_64/stub.S
@@ -8,18 +8,18 @@ syscall_stub:
8 /* We don't have 64-bit constants, so this constructs the address 8 /* We don't have 64-bit constants, so this constructs the address
9 * we need. 9 * we need.
10 */ 10 */
11 movq $(ASM_STUB_DATA >> 32), %rbx 11 movq $(STUB_DATA >> 32), %rbx
12 salq $32, %rbx 12 salq $32, %rbx
13 movq $(ASM_STUB_DATA & 0xffffffff), %rcx 13 movq $(STUB_DATA & 0xffffffff), %rcx
14 or %rcx, %rbx 14 or %rcx, %rbx
15 movq %rax, (%rbx) 15 movq %rax, (%rbx)
16 int3 16 int3
17 17
18 .globl batch_syscall_stub 18 .globl batch_syscall_stub
19batch_syscall_stub: 19batch_syscall_stub:
20 mov $(ASM_STUB_DATA >> 32), %rbx 20 mov $(STUB_DATA >> 32), %rbx
21 sal $32, %rbx 21 sal $32, %rbx
22 mov $(ASM_STUB_DATA & 0xffffffff), %rax 22 mov $(STUB_DATA & 0xffffffff), %rax
23 or %rax, %rbx 23 or %rax, %rbx
24 /* load pointer to first operation */ 24 /* load pointer to first operation */
25 mov %rbx, %rsp 25 mov %rbx, %rsp