diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-04-13 00:27:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-04-13 00:27:59 +0000 |
commit | 381a0c26d73e0f074c962e0ab53b99a6c327066d (patch) | |
tree | 462d3f66a9a37fd6b4844268b5c615e6239e364e /sysdeps | |
parent | cfcc576a36aebf169a1a3e8b58cd7dd956123cb2 (diff) | |
download | glibc-381a0c26d73e0f074c962e0ab53b99a6c327066d.tar glibc-381a0c26d73e0f074c962e0ab53b99a6c327066d.tar.gz glibc-381a0c26d73e0f074c962e0ab53b99a6c327066d.tar.bz2 glibc-381a0c26d73e0f074c962e0ab53b99a6c327066d.zip |
Update.
2004-04-09 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL): Move
LOAD_ARGS_##nr up front and add LOAD_REGS_##nr.
(LOAD_ARGS_0, LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4)
(LOAD_ARGS_5, LOAD_ARGS_6): Load argument values into temporary
variables.
(LOAD_REGS_0, LOAD_REGS_1, LOAD_REGS_2, LOAD_REGS_3, LOAD_REGS_4)
(LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the
syscall argument registers.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL): Add
LOAD_REGS_##nr.
(LOAD_ARGS_0, LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4)
(LOAD_ARGS_5, LOAD_ARGS_6): Load argument values into temporary
variables.
(LOAD_REGS_0, LOAD_REGS_1, LOAD_REGS_2, LOAD_REGS_3, LOAD_REGS_4)
(LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the
syscall argument registers.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/sysdep.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 8ba7d446a8..09f8492cc6 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001,02,03 Free Software Foundation, Inc. +/* Copyright (C) 2001,02,03,04 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -241,6 +241,7 @@ ({ \ unsigned long resultvar; \ LOAD_ARGS_##nr (args) \ + LOAD_REGS_##nr \ asm volatile ( \ "movq %1, %%rax\n\t" \ "syscall\n\t" \ @@ -256,36 +257,55 @@ #define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOAD_ARGS_0() +#define LOAD_REGS_0 #define ASM_ARGS_0 #define LOAD_ARGS_1(a1) \ - register long int _a1 asm ("rdi") = (long) (a1); \ + long int __arg1 = (long) (a1); \ LOAD_ARGS_0 () +#define LOAD_REGS_1 \ + register long int _a1 asm ("rdi") = __arg1; \ + LOAD_REGS_0 #define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) #define LOAD_ARGS_2(a1, a2) \ - register long int _a2 asm ("rsi") = (long) (a2); \ + long int __arg2 = (long) (a2); \ LOAD_ARGS_1 (a1) +#define LOAD_REGS_2 \ + register long int _a2 asm ("rsi") = __arg2; \ + LOAD_REGS_1 #define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) #define LOAD_ARGS_3(a1, a2, a3) \ - register long int _a3 asm ("rdx") = (long) (a3); \ + long int __arg3 = (long) (a3); \ LOAD_ARGS_2 (a1, a2) +#define LOAD_REGS_3 \ + register long int _a3 asm ("rdx") = __arg3; \ + LOAD_REGS_2 #define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) #define LOAD_ARGS_4(a1, a2, a3, a4) \ - register long int _a4 asm ("r10") = (long) (a4); \ + long int __arg4 = (long) (a4); \ LOAD_ARGS_3 (a1, a2, a3) +#define LOAD_REGS_4 \ + register long int _a4 asm ("r10") = __arg4; \ + LOAD_REGS_3 #define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4) #define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ - register long int _a5 asm ("r8") = (long) (a5); \ + long int __arg5 = (long) (a5); \ LOAD_ARGS_4 (a1, a2, a3, a4) +#define LOAD_REGS_5 \ + register long int _a5 asm ("r8") = __arg5; \ + LOAD_REGS_4 #define ASM_ARGS_5 ASM_ARGS_4, "r" (_a5) #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ - register long int _a6 asm ("r9") = (long) (a6); \ + long int __arg6 = (long) (a6); \ LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define LOAD_REGS_6 \ + register long int _a6 asm ("r9") = __arg6; \ + LOAD_REGS_5 #define ASM_ARGS_6 ASM_ARGS_5, "r" (_a6) #endif /* __ASSEMBLER__ */ |