aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-i386/stub.S
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-i386/stub.S
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-i386/stub.S')
-rw-r--r--arch/um/sys-i386/stub.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/sys-i386/stub.S b/arch/um/sys-i386/stub.S
index e730772c401b..7699e89f660f 100644
--- a/arch/um/sys-i386/stub.S
+++ b/arch/um/sys-i386/stub.S
@@ -7,7 +7,7 @@
7 .globl batch_syscall_stub 7 .globl batch_syscall_stub
8batch_syscall_stub: 8batch_syscall_stub:
9 /* load pointer to first operation */ 9 /* load pointer to first operation */
10 mov $(ASM_STUB_DATA+8), %esp 10 mov $(STUB_DATA+8), %esp
11 11
12again: 12again:
13 /* load length of additional data */ 13 /* load length of additional data */
@@ -15,12 +15,12 @@ again:
15 15
16 /* if(length == 0) : end of list */ 16 /* if(length == 0) : end of list */
17 /* write possible 0 to header */ 17 /* write possible 0 to header */
18 mov %eax, ASM_STUB_DATA+4 18 mov %eax, STUB_DATA+4
19 cmpl $0, %eax 19 cmpl $0, %eax
20 jz done 20 jz done
21 21
22 /* save current pointer */ 22 /* save current pointer */
23 mov %esp, ASM_STUB_DATA+4 23 mov %esp, STUB_DATA+4
24 24
25 /* skip additional data */ 25 /* skip additional data */
26 add %eax, %esp 26 add %eax, %esp
@@ -46,7 +46,7 @@ again:
46 46
47done: 47done:
48 /* save return value */ 48 /* save return value */
49 mov %eax, ASM_STUB_DATA 49 mov %eax, STUB_DATA
50 50
51 /* stop */ 51 /* stop */
52 int3 52 int3