summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-02-15 18:08:23 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-02-15 18:08:23 +0000
commit15955f731affc95d7615e5c011fb816b4221a952 (patch)
tree0a9c091d959b4e3eafa71c39ee0ee3e29eb1366c /libc/sysdeps/linux/i386
parent24d6be40bc0984e0e738f2c2210b0cf475d54284 (diff)
Block the combo DOMULTI/SUPPORT_LD_DEBUG
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r--libc/sysdeps/linux/i386/bits/syscalls.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
index a69c4a669..857491f06 100644
--- a/libc/sysdeps/linux/i386/bits/syscalls.h
+++ b/libc/sysdeps/linux/i386/bits/syscalls.h
@@ -20,6 +20,12 @@
/* We need some help from the assembler to generate optimal code. We
define some macros here which later will be used. */
+
+#if defined __SUPPORT_LD_DEBUG__ && defined __DOMULTI__
+#error LD debugging and DOMULTI are incompatible
+#endif
+
+#ifdef __DOMULTI__
__asm__ (".L__X'%ebx = 1\n\t"
".L__X'%ecx = 2\n\t"
".L__X'%edx = 2\n\t"
@@ -56,7 +62,41 @@ __asm__ (".L__X'%ebx = 1\n\t"
".endif\n\t"
".endm\n\t"
".endif\n\t");
-
+#else
+__asm__ (".L__X'%ebx = 1\n\t"
+ ".L__X'%ecx = 2\n\t"
+ ".L__X'%edx = 2\n\t"
+ ".L__X'%eax = 3\n\t"
+ ".L__X'%esi = 3\n\t"
+ ".L__X'%edi = 3\n\t"
+ ".L__X'%ebp = 3\n\t"
+ ".L__X'%esp = 3\n\t"
+ ".macro bpushl name reg\n\t"
+ ".if 1 - \\name\n\t"
+ ".if 2 - \\name\n\t"
+ "pushl %ebx\n\t"
+ ".else\n\t"
+ "xchgl \\reg, %ebx\n\t"
+ ".endif\n\t"
+ ".endif\n\t"
+ ".endm\n\t"
+ ".macro bpopl name reg\n\t"
+ ".if 1 - \\name\n\t"
+ ".if 2 - \\name\n\t"
+ "popl %ebx\n\t"
+ ".else\n\t"
+ "xchgl \\reg, %ebx\n\t"
+ ".endif\n\t"
+ ".endif\n\t"
+ ".endm\n\t"
+ ".macro bmovl name reg\n\t"
+ ".if 1 - \\name\n\t"
+ ".if 2 - \\name\n\t"
+ "movl \\reg, %ebx\n\t"
+ ".endif\n\t"
+ ".endif\n\t"
+ ".endm\n\t");
+#endif
#undef _syscall0
#define _syscall0(type,name) \