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"
"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"

View File

@ -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];

View File

@ -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

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,
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

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.
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
* 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

View File

@ -22,8 +22,8 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#include <sys/types.h>
#include <sgidefs.h>
#include <sys/types.h>
/* 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];

View File

@ -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

View File

@ -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
{

View File

@ -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;

View File

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

View File

@ -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

View File

@ -21,7 +21,6 @@
#define _SYS_TAS_H 1
#include <features.h>
#include <sgidefs.h>
__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"

View File

@ -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
{