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>
This commit is contained in:
committed by
Linus Torvalds
parent
ee56314b79
commit
4bdf8bc4a1
@ -7,7 +7,7 @@
|
||||
.globl batch_syscall_stub
|
||||
batch_syscall_stub:
|
||||
/* load pointer to first operation */
|
||||
mov $(ASM_STUB_DATA+8), %esp
|
||||
mov $(STUB_DATA+8), %esp
|
||||
|
||||
again:
|
||||
/* load length of additional data */
|
||||
@ -15,12 +15,12 @@ again:
|
||||
|
||||
/* if(length == 0) : end of list */
|
||||
/* write possible 0 to header */
|
||||
mov %eax, ASM_STUB_DATA+4
|
||||
mov %eax, STUB_DATA+4
|
||||
cmpl $0, %eax
|
||||
jz done
|
||||
|
||||
/* save current pointer */
|
||||
mov %esp, ASM_STUB_DATA+4
|
||||
mov %esp, STUB_DATA+4
|
||||
|
||||
/* skip additional data */
|
||||
add %eax, %esp
|
||||
@ -46,7 +46,7 @@ again:
|
||||
|
||||
done:
|
||||
/* save return value */
|
||||
mov %eax, ASM_STUB_DATA
|
||||
mov %eax, STUB_DATA
|
||||
|
||||
/* stop */
|
||||
int3
|
||||
|
Reference in New Issue
Block a user