From 73a227e20020c9505c7fd1c66c37ffa9097f5e11 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:37:35 +0000 Subject: [PATCH] Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout. --- sysdeps/mips/atomicity.h | 10 ++++----- sysdeps/mips/bits/setjmp.h | 4 ++-- sysdeps/mips/fpu/bits/mathdef.h | 2 +- sysdeps/mips/machine-gmon.h | 6 +++--- sysdeps/mips/sys/asm.h | 28 +++++++++++++------------- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/sigcontext.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/stat.h | 2 +- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 2 +- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 2 +- sysdeps/unix/sysv/linux/mips/sys/ptrace.h | 2 +- sysdeps/unix/sysv/linux/mips/sys/tas.h | 3 +-- sysdeps/unix/sysv/linux/mips/sys/user.h | 8 ++++---- 13 files changed, 40 insertions(+), 41 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index f3d05bd..7380e10 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, int val) ("/* Inline exchange & add */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%3\n\t" @@ -59,7 +59,7 @@ atomic_add (volatile uint32_t *mem, int val) ("/* Inline atomic add */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%2\n\t" @@ -83,10 +83,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) ("/* Inline compare & swap */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 "lld %1,%5\n\t" #else "ll %1,%5\n\t" @@ -94,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 "scd %0,%2\n\t" #else "sc %0,%2\n\t" diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 4ca199d..ec0aaa0 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -26,7 +26,7 @@ typedef struct { -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* Program counter. */ __ptr_t __pc; @@ -62,7 +62,7 @@ typedef struct int __fpc_csr; /* Callee-saved floating point registers. */ -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 double __fpregs[8]; #else double __fpregs[6]; diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h index c1ce876..99be0db 100644 --- a/sysdeps/mips/fpu/bits/mathdef.h +++ b/sysdeps/mips/fpu/bits/mathdef.h @@ -39,7 +39,7 @@ typedef double double_t; /* `double' expressions are evaluated as #endif /* ISO C99 */ -#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32 +#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 /* Signal that we do not really have a `long double'. This disables the declaration of all the `long double' function variants. */ # define __NO_LONG_DOUBLE_MATH 1 diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index f23a4c3..7a089fa 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -26,7 +26,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) /* Call __mcount with the return PC for our caller, and the return PC our caller will return to. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 #ifdef __PIC__ # define CPLOAD ".cpload $25;" @@ -83,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) # define CPRETURN #endif -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 # define PTR_ADDU_STRING "add" /* no u */ # define PTR_SUBU_STRING "sub" /* no u */ -#elif _MIPS_SIM == _MIPS_SIM_ABI64 +#elif _MIPS_SIM == _ABI64 # define PTR_ADDU_STRING "daddu" # define PTR_SUBU_STRING "dsubu" #else diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 76f6af3..b04c36b 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -37,11 +37,11 @@ * 64 bit address space isn't used yet, so we may use the R3000 32 bit * defines for now. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 # define PTR .word # define PTRSIZE 4 # define PTRLOG 2 -#elif (_MIPS_SIM == _MIPS_SIM_ABI64) +#elif _MIPS_SIM == _ABI64 # define PTR .dword # define PTRSIZE 8 # define PTRLOG 3 @@ -50,7 +50,7 @@ /* * PIC specific declarations */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) +#if _MIPS_SIM == _ABIO32 # ifdef __PIC__ # define CPRESTORE(register) \ .cprestore register @@ -97,7 +97,7 @@ l: \ # define SETUP_GPX64_L(cp_reg, ra_save, l) # define RESTORE_GP64 # define USE_ALT_CP(a) -#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */ +#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */ /* * For callee-saved gp calling convention: */ @@ -131,15 +131,15 @@ l: \ /* Use alternate register for context pointer. */ # define USE_ALT_CP(reg) \ .cplocal reg -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ /* * Stack Frame Definitions */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) +#if _MIPS_SIM == _ABIO32 # define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */ #endif -#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define NARGSAVE 0 /* No caller responsibilities. */ #endif @@ -287,7 +287,7 @@ symbol = value /* * Stack alignment */ -#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define ALSZ 15 # define ALMASK ~15 #else @@ -298,7 +298,7 @@ symbol = value /* * Size of a register */ -#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define SZREG 8 #else # define SZREG 4 @@ -389,7 +389,7 @@ symbol = value /* * How to add/sub/load/store/shift pointers. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32) +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32) # define PTR_ADD add # define PTR_ADDI addi # define PTR_ADDU addu @@ -411,7 +411,7 @@ symbol = value # define PTR_SCALESHIFT 2 #endif -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 # define PTR_ADD add # define PTR_ADDI addi # define PTR_ADDU add /* no u */ @@ -433,8 +433,8 @@ symbol = value # define PTR_SCALESHIFT 2 #endif -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \ - || _MIPS_SIM == _MIPS_SIM_ABI64 +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \ + || _MIPS_SIM == _ABI64 # define PTR_ADD dadd # define PTR_ADDI daddi # define PTR_ADDU daddu diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 550593b..aa039b4 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -22,8 +22,8 @@ # error "Never use directly; include instead." #endif -#include #include +#include /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -144,7 +144,7 @@ typedef struct flock #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#if _MIPS_SIM != _MIPS_SIM_ABI64 +#if _MIPS_SIM != _ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit fcntls in o32 and n32, never has this field. */ long int l_sysid; @@ -154,7 +154,7 @@ typedef struct flock __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif __pid_t l_pid; /* Process holding the lock. */ -#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _MIPS_SIM_ABI64 +#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit flock in o32 and n32, never has this field. */ long int pad[4]; diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h index 19f5881..079964e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -34,7 +34,7 @@ licenses, the fact that the file is pasted, instead of included, doesn't really make any difference for the program that includes this header. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -70,7 +70,7 @@ struct sigcontext { }; #endif /* _ASM_SIGCONTEXT_H */ -#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#else /* _MIPS_SIM != _ABIO32 */ /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -101,5 +101,5 @@ struct sigcontext { }; #endif /* _ASM_SIGCONTEXT_H */ -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 2dd4cab..9ae38cd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -36,7 +36,7 @@ #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* Structure describing file characteristics. */ struct stat { diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 6a4c409..cab1e71 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -3,7 +3,7 @@ userland data structures are not identical, because of different padding. */ /* Definition of `struct stat' used in the kernel. */ -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 struct kernel_stat { unsigned int st_dev; diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 2b50647..f453c8d 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -20,7 +20,7 @@ #include -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 #define SIGCONTEXT unsigned long _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h index 9badeb3..d05853d 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h @@ -124,7 +124,7 @@ enum __ptrace_request appear (those that are used for the particular request) as: pid_t PID, void *ADDR, int DATA, void *ADDR2 after REQUEST. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ extern long long int ptrace (enum __ptrace_request __request, ...) __THROW; #else diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 006e161..e5180f9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -21,7 +21,6 @@ #define _SYS_TAS_H 1 #include - #include __BEGIN_DECLS @@ -43,7 +42,7 @@ _test_and_set (int *p, int v) __THROW ("/* Inline test and set */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%3\n\t" diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h index dc3ee83..d5b3b05 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -32,7 +32,7 @@ instead of included separately, doesn't change in any way the licensing status of a program that includes user.h. Since this is for gdb alone, and gdb is GPLed, no surprises here. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* * Various register offset definitions for debuggers, core file * examiners and whatnot. @@ -100,7 +100,7 @@ #endif /* __ASM_MIPS_REG_H */ -#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#else /* _MIPS_SIM != _ABIO32 */ /* * Various register offset definitions for debuggers, core file @@ -170,9 +170,9 @@ #endif /* _ASM_REG_H */ -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 struct user { -- 2.7.4