Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout.

This commit is contained in:
Andreas Jaeger 2004-11-24 04:37:35 +00:00
parent b8ddf7a11f
commit 73a227e200
13 changed files with 40 additions and 41 deletions

View File

@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, int val)
("/* Inline exchange & add */\n" ("/* Inline exchange & add */\n"
"1:\n\t" "1:\n\t"
".set push\n\t" ".set push\n\t"
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
".set mips2\n\t" ".set mips2\n\t"
#endif #endif
"ll %0,%3\n\t" "ll %0,%3\n\t"
@ -59,7 +59,7 @@ atomic_add (volatile uint32_t *mem, int val)
("/* Inline atomic add */\n" ("/* Inline atomic add */\n"
"1:\n\t" "1:\n\t"
".set push\n\t" ".set push\n\t"
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
".set mips2\n\t" ".set mips2\n\t"
#endif #endif
"ll %0,%2\n\t" "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" ("/* Inline compare & swap */\n"
"1:\n\t" "1:\n\t"
".set push\n\t" ".set push\n\t"
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
".set mips2\n\t" ".set mips2\n\t"
#endif #endif
#if _MIPS_SIM == _MIPS_SIM_ABI64 #if _MIPS_SIM == _ABI64
"lld %1,%5\n\t" "lld %1,%5\n\t"
#else #else
"ll %1,%5\n\t" "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" "move %0,$0\n\t"
"bne %1,%3,2f\n\t" "bne %1,%3,2f\n\t"
"move %0,%4\n\t" "move %0,%4\n\t"
#if _MIPS_SIM == _MIPS_SIM_ABI64 #if _MIPS_SIM == _ABI64
"scd %0,%2\n\t" "scd %0,%2\n\t"
#else #else
"sc %0,%2\n\t" "sc %0,%2\n\t"

View File

@ -26,7 +26,7 @@
typedef struct typedef struct
{ {
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
/* Program counter. */ /* Program counter. */
__ptr_t __pc; __ptr_t __pc;
@ -62,7 +62,7 @@ typedef struct
int __fpc_csr; int __fpc_csr;
/* Callee-saved floating point registers. */ /* Callee-saved floating point registers. */
#if _MIPS_SIM == _MIPS_SIM_ABI64 #if _MIPS_SIM == _ABI64
double __fpregs[8]; double __fpregs[8];
#else #else
double __fpregs[6]; double __fpregs[6];

View File

@ -39,7 +39,7 @@ typedef double double_t; /* `double' expressions are evaluated as
#endif /* ISO C99 */ #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 /* Signal that we do not really have a `long double'. This disables the
declaration of all the `long double' function variants. */ declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1 # define __NO_LONG_DOUBLE_MATH 1

View File

@ -26,7 +26,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
/* Call __mcount with the return PC for our caller, /* Call __mcount with the return PC for our caller,
and the return PC our caller will return to. */ and the return PC our caller will return to. */
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
#ifdef __PIC__ #ifdef __PIC__
# define CPLOAD ".cpload $25;" # define CPLOAD ".cpload $25;"
@ -83,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
# define CPRETURN # define CPRETURN
#endif #endif
#if _MIPS_SIM == _MIPS_SIM_NABI32 #if _MIPS_SIM == _ABIN32
# define PTR_ADDU_STRING "add" /* no u */ # define PTR_ADDU_STRING "add" /* no u */
# define PTR_SUBU_STRING "sub" /* 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_ADDU_STRING "daddu"
# define PTR_SUBU_STRING "dsubu" # define PTR_SUBU_STRING "dsubu"
#else #else

View File

@ -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. This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>. Contributed by Ralf Baechle <ralf@gnu.org>.
@ -37,11 +37,11 @@
* 64 bit address space isn't used yet, so we may use the R3000 32 bit * 64 bit address space isn't used yet, so we may use the R3000 32 bit
* defines for now. * 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 PTR .word
# define PTRSIZE 4 # define PTRSIZE 4
# define PTRLOG 2 # define PTRLOG 2
#elif (_MIPS_SIM == _MIPS_SIM_ABI64) #elif _MIPS_SIM == _ABI64
# define PTR .dword # define PTR .dword
# define PTRSIZE 8 # define PTRSIZE 8
# define PTRLOG 3 # define PTRLOG 3
@ -50,7 +50,7 @@
/* /*
* PIC specific declarations * PIC specific declarations
*/ */
#if (_MIPS_SIM == _MIPS_SIM_ABI32) #if _MIPS_SIM == _ABIO32
# ifdef __PIC__ # ifdef __PIC__
# define CPRESTORE(register) \ # define CPRESTORE(register) \
.cprestore register .cprestore register
@ -97,7 +97,7 @@ l: \
# define SETUP_GPX64_L(cp_reg, ra_save, l) # define SETUP_GPX64_L(cp_reg, ra_save, l)
# define RESTORE_GP64 # define RESTORE_GP64
# define USE_ALT_CP(a) # 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: * For callee-saved gp calling convention:
*/ */
@ -131,15 +131,15 @@ l: \
/* Use alternate register for context pointer. */ /* Use alternate register for context pointer. */
# define USE_ALT_CP(reg) \ # define USE_ALT_CP(reg) \
.cplocal reg .cplocal reg
#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ #endif /* _MIPS_SIM != _ABIO32 */
/* /*
* Stack Frame Definitions * Stack Frame Definitions
*/ */
#if (_MIPS_SIM == _MIPS_SIM_ABI32) #if _MIPS_SIM == _ABIO32
# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */ # define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */
#endif #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. */ # define NARGSAVE 0 /* No caller responsibilities. */
#endif #endif
@ -287,7 +287,7 @@ symbol = value
/* /*
* Stack alignment * Stack alignment
*/ */
#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) #if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define ALSZ 15 # define ALSZ 15
# define ALMASK ~15 # define ALMASK ~15
#else #else
@ -298,7 +298,7 @@ symbol = value
/* /*
* Size of a register * 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 # define SZREG 8
#else #else
# define SZREG 4 # define SZREG 4
@ -389,7 +389,7 @@ symbol = value
/* /*
* How to add/sub/load/store/shift pointers. * 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_ADD add
# define PTR_ADDI addi # define PTR_ADDI addi
# define PTR_ADDU addu # define PTR_ADDU addu
@ -411,7 +411,7 @@ symbol = value
# define PTR_SCALESHIFT 2 # define PTR_SCALESHIFT 2
#endif #endif
#if _MIPS_SIM == _MIPS_SIM_NABI32 #if _MIPS_SIM == _ABIN32
# define PTR_ADD add # define PTR_ADD add
# define PTR_ADDI addi # define PTR_ADDI addi
# define PTR_ADDU add /* no u */ # define PTR_ADDU add /* no u */
@ -433,8 +433,8 @@ symbol = value
# define PTR_SCALESHIFT 2 # define PTR_SCALESHIFT 2
#endif #endif
#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \ #if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \
|| _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _ABI64
# define PTR_ADD dadd # define PTR_ADD dadd
# define PTR_ADDI daddi # define PTR_ADDI daddi
# define PTR_ADDU daddu # define PTR_ADDU daddu

View File

@ -22,8 +22,8 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif #endif
#include <sys/types.h>
#include <sgidefs.h> #include <sgidefs.h>
#include <sys/types.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */ located on an ext2 file system */
@ -144,7 +144,7 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64 #ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */ __off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */ __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 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
fcntls in o32 and n32, never has this field. */ fcntls in o32 and n32, never has this field. */
long int l_sysid; long int l_sysid;
@ -154,7 +154,7 @@ typedef struct flock
__off64_t l_len; /* Size of the locked area; zero means until EOF. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif #endif
__pid_t l_pid; /* Process holding the lock. */ __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 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
flock in o32 and n32, never has this field. */ flock in o32 and n32, never has this field. */
long int pad[4]; long int pad[4];

View File

@ -34,7 +34,7 @@
licenses, the fact that the file is pasted, instead of included, licenses, the fact that the file is pasted, instead of included,
doesn't really make any difference for the program that includes doesn't really make any difference for the program that includes
this header. */ 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 * 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 * License. See the file "COPYING" in the main directory of this archive
@ -70,7 +70,7 @@ struct sigcontext {
}; };
#endif /* _ASM_SIGCONTEXT_H */ #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 * 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 * License. See the file "COPYING" in the main directory of this archive
@ -101,5 +101,5 @@ struct sigcontext {
}; };
#endif /* _ASM_SIGCONTEXT_H */ #endif /* _ASM_SIGCONTEXT_H */
#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ #endif /* _MIPS_SIM != _ABIO32 */
#endif #endif

View File

@ -36,7 +36,7 @@
#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
/* Structure describing file characteristics. */ /* Structure describing file characteristics. */
struct stat struct stat
{ {

View File

@ -3,7 +3,7 @@
userland data structures are not identical, because of different userland data structures are not identical, because of different
padding. */ padding. */
/* Definition of `struct stat' used in the kernel. */ /* Definition of `struct stat' used in the kernel. */
#if _MIPS_SIM != _MIPS_SIM_ABI32 #if _MIPS_SIM != _ABIO32
struct kernel_stat struct kernel_stat
{ {
unsigned int st_dev; unsigned int st_dev;

View File

@ -20,7 +20,7 @@
#include <sgidefs.h> #include <sgidefs.h>
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
#define SIGCONTEXT unsigned long _code, struct sigcontext * #define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code, #define SIGCONTEXT_EXTRA_ARGS _code,

View File

@ -124,7 +124,7 @@ enum __ptrace_request
appear (those that are used for the particular request) as: appear (those that are used for the particular request) as:
pid_t PID, void *ADDR, int DATA, void *ADDR2 pid_t PID, void *ADDR, int DATA, void *ADDR2
after REQUEST. */ after REQUEST. */
#if _MIPS_SIM == _MIPS_SIM_NABI32 #if _MIPS_SIM == _ABIN32
__extension__ extern long long int ptrace __extension__ extern long long int ptrace
(enum __ptrace_request __request, ...) __THROW; (enum __ptrace_request __request, ...) __THROW;
#else #else

View File

@ -21,7 +21,6 @@
#define _SYS_TAS_H 1 #define _SYS_TAS_H 1
#include <features.h> #include <features.h>
#include <sgidefs.h> #include <sgidefs.h>
__BEGIN_DECLS __BEGIN_DECLS
@ -43,7 +42,7 @@ _test_and_set (int *p, int v) __THROW
("/* Inline test and set */\n" ("/* Inline test and set */\n"
"1:\n\t" "1:\n\t"
".set push\n\t" ".set push\n\t"
#if _MIPS_SIM == _MIPS_SIM_ABI32 #if _MIPS_SIM == _ABIO32
".set mips2\n\t" ".set mips2\n\t"
#endif #endif
"ll %0,%3\n\t" "ll %0,%3\n\t"

View File

@ -32,7 +32,7 @@
instead of included separately, doesn't change in any way the instead of included separately, doesn't change in any way the
licensing status of a program that includes user.h. Since this is licensing status of a program that includes user.h. Since this is
for gdb alone, and gdb is GPLed, no surprises here. */ 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 * Various register offset definitions for debuggers, core file
* examiners and whatnot. * examiners and whatnot.
@ -100,7 +100,7 @@
#endif /* __ASM_MIPS_REG_H */ #endif /* __ASM_MIPS_REG_H */
#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ #else /* _MIPS_SIM != _ABIO32 */
/* /*
* Various register offset definitions for debuggers, core file * Various register offset definitions for debuggers, core file
@ -170,9 +170,9 @@
#endif /* _ASM_REG_H */ #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 struct user
{ {