Makefile.in (LIB2FUNCS): Remove _varargs and __dummy.
* Makefile.in (LIB2FUNCS): Remove _varargs and __dummy. * libgcc-std.ver: Remove __builtin_saveregs, __dummy, and __empty. * libgcc2.c: Remove __dummy and __builtin_saveregs. * libgcc2.h: Don't prototype __builtin_saveregs or __dummy. * config/i860/varargs.asm: New file - preserve i860 __builtin_saveregs for future reference. From-SVN: r41529
This commit is contained in:
parent
47c84870c6
commit
0f976b4577
@ -1,3 +1,12 @@
|
||||
2001-04-24 Zack Weinberg <zackw@stanford.edu>
|
||||
|
||||
* Makefile.in (LIB2FUNCS): Remove _varargs and __dummy.
|
||||
* libgcc-std.ver: Remove __builtin_saveregs, __dummy, and __empty.
|
||||
* libgcc2.c: Remove __dummy and __builtin_saveregs.
|
||||
* libgcc2.h: Don't prototype __builtin_saveregs or __dummy.
|
||||
* config/i860/varargs.asm: New file - preserve i860 __builtin_saveregs
|
||||
for future reference.
|
||||
|
||||
2001-04-24 Jason Merrill <jason_merrill@redhat.com>
|
||||
|
||||
* except.c (reachable_handlers): Step out one level from a RESX.
|
||||
|
@ -797,7 +797,7 @@ LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
|
||||
_fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
|
||||
_fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
|
||||
_fixtfdi _fixunstfdi _floatditf \
|
||||
__gcc_bcmp _varargs __dummy _eprintf \
|
||||
__gcc_bcmp _eprintf \
|
||||
_bb _clear_cache _trampoline __main _exit \
|
||||
_absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
|
||||
_mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \
|
||||
|
201
gcc/config/i860/varargs.asm
Normal file
201
gcc/config/i860/varargs.asm
Normal file
@ -0,0 +1,201 @@
|
||||
/* Special varargs support for i860.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
In addition to the permissions in the GNU General Public License, the
|
||||
Free Software Foundation gives you unlimited permission to link the
|
||||
compiled version of this file into combinations with other programs,
|
||||
and to distribute those combinations without any restriction coming
|
||||
from the use of this file. (The General Public License restrictions
|
||||
do apply in other respects; for example, they cover modification of
|
||||
the file, and distribution when not linked into a combine
|
||||
executable.)
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if defined(__svr4__) || defined(__alliant__)
|
||||
.text
|
||||
.align 4
|
||||
|
||||
/* The Alliant needs the added underscore. */
|
||||
.globl __builtin_saveregs
|
||||
__builtin_saveregs:
|
||||
.globl ___builtin_saveregs
|
||||
___builtin_saveregs:
|
||||
|
||||
andnot 0x0f,%sp,%sp /* round down to 16-byte boundary */
|
||||
adds -96,%sp,%sp /* allocate stack space for reg save
|
||||
area and also for a new va_list
|
||||
structure */
|
||||
/* Save all argument registers in the arg reg save area. The
|
||||
arg reg save area must have the following layout (according
|
||||
to the svr4 ABI):
|
||||
|
||||
struct {
|
||||
union {
|
||||
float freg[8];
|
||||
double dreg[4];
|
||||
} float_regs;
|
||||
long ireg[12];
|
||||
};
|
||||
*/
|
||||
|
||||
fst.q %f8, 0(%sp) /* save floating regs (f8-f15) */
|
||||
fst.q %f12,16(%sp)
|
||||
|
||||
st.l %r16,32(%sp) /* save integer regs (r16-r27) */
|
||||
st.l %r17,36(%sp)
|
||||
st.l %r18,40(%sp)
|
||||
st.l %r19,44(%sp)
|
||||
st.l %r20,48(%sp)
|
||||
st.l %r21,52(%sp)
|
||||
st.l %r22,56(%sp)
|
||||
st.l %r23,60(%sp)
|
||||
st.l %r24,64(%sp)
|
||||
st.l %r25,68(%sp)
|
||||
st.l %r26,72(%sp)
|
||||
st.l %r27,76(%sp)
|
||||
|
||||
adds 80,%sp,%r16 /* compute the address of the new
|
||||
va_list structure. Put in into
|
||||
r16 so that it will be returned
|
||||
to the caller. */
|
||||
|
||||
/* Initialize all fields of the new va_list structure. This
|
||||
structure looks like:
|
||||
|
||||
typedef struct {
|
||||
unsigned long ireg_used;
|
||||
unsigned long freg_used;
|
||||
long *reg_base;
|
||||
long *mem_ptr;
|
||||
} va_list;
|
||||
*/
|
||||
|
||||
st.l %r0, 0(%r16) /* nfixed */
|
||||
st.l %r0, 4(%r16) /* nfloating */
|
||||
st.l %sp, 8(%r16) /* __va_ctl points to __va_struct. */
|
||||
bri %r1 /* delayed return */
|
||||
st.l %r28,12(%r16) /* pointer to overflow args */
|
||||
|
||||
#else /* not __svr4__ */
|
||||
#if defined(__PARAGON__)
|
||||
/*
|
||||
* we'll use SVR4-ish varargs but need SVR3.2 assembler syntax,
|
||||
* and we stand a better chance of hooking into libraries
|
||||
* compiled by PGI. [andyp@ssd.intel.com]
|
||||
*/
|
||||
.text
|
||||
.align 4
|
||||
.globl __builtin_saveregs
|
||||
__builtin_saveregs:
|
||||
.globl ___builtin_saveregs
|
||||
___builtin_saveregs:
|
||||
|
||||
andnot 0x0f,sp,sp /* round down to 16-byte boundary */
|
||||
adds -96,sp,sp /* allocate stack space for reg save
|
||||
area and also for a new va_list
|
||||
structure */
|
||||
/* Save all argument registers in the arg reg save area. The
|
||||
arg reg save area must have the following layout (according
|
||||
to the svr4 ABI):
|
||||
|
||||
struct {
|
||||
union {
|
||||
float freg[8];
|
||||
double dreg[4];
|
||||
} float_regs;
|
||||
long ireg[12];
|
||||
};
|
||||
*/
|
||||
|
||||
fst.q f8, 0(sp)
|
||||
fst.q f12,16(sp)
|
||||
st.l r16,32(sp)
|
||||
st.l r17,36(sp)
|
||||
st.l r18,40(sp)
|
||||
st.l r19,44(sp)
|
||||
st.l r20,48(sp)
|
||||
st.l r21,52(sp)
|
||||
st.l r22,56(sp)
|
||||
st.l r23,60(sp)
|
||||
st.l r24,64(sp)
|
||||
st.l r25,68(sp)
|
||||
st.l r26,72(sp)
|
||||
st.l r27,76(sp)
|
||||
|
||||
adds 80,sp,r16 /* compute the address of the new
|
||||
va_list structure. Put in into
|
||||
r16 so that it will be returned
|
||||
to the caller. */
|
||||
|
||||
/* Initialize all fields of the new va_list structure. This
|
||||
structure looks like:
|
||||
|
||||
typedef struct {
|
||||
unsigned long ireg_used;
|
||||
unsigned long freg_used;
|
||||
long *reg_base;
|
||||
long *mem_ptr;
|
||||
} va_list;
|
||||
*/
|
||||
|
||||
st.l r0, 0(r16) /* nfixed */
|
||||
st.l r0, 4(r16) /* nfloating */
|
||||
st.l sp, 8(r16) /* __va_ctl points to __va_struct. */
|
||||
bri r1 /* delayed return */
|
||||
st.l r28,12(r16) /* pointer to overflow args */
|
||||
#else /* not __PARAGON__ */
|
||||
.text
|
||||
.align 4
|
||||
|
||||
.globl ___builtin_saveregs
|
||||
___builtin_saveregs:
|
||||
mov sp,r30
|
||||
andnot 0x0f,sp,sp
|
||||
adds -96,sp,sp /* allocate sufficient space on the stack */
|
||||
|
||||
/* Fill in the __va_struct. */
|
||||
st.l r16, 0(sp) /* save integer regs (r16-r27) */
|
||||
st.l r17, 4(sp) /* int fixed[12] */
|
||||
st.l r18, 8(sp)
|
||||
st.l r19,12(sp)
|
||||
st.l r20,16(sp)
|
||||
st.l r21,20(sp)
|
||||
st.l r22,24(sp)
|
||||
st.l r23,28(sp)
|
||||
st.l r24,32(sp)
|
||||
st.l r25,36(sp)
|
||||
st.l r26,40(sp)
|
||||
st.l r27,44(sp)
|
||||
|
||||
fst.q f8, 48(sp) /* save floating regs (f8-f15) */
|
||||
fst.q f12,64(sp) /* int floating[8] */
|
||||
|
||||
/* Fill in the __va_ctl. */
|
||||
st.l sp, 80(sp) /* __va_ctl points to __va_struct. */
|
||||
st.l r28,84(sp) /* pointer to more args */
|
||||
st.l r0, 88(sp) /* nfixed */
|
||||
st.l r0, 92(sp) /* nfloating */
|
||||
|
||||
adds 80,sp,r16 /* return address of the __va_ctl. */
|
||||
bri r1
|
||||
mov r30,sp
|
||||
/* recover stack and pass address to start
|
||||
of data. */
|
||||
#endif /* not __PARAGON__ */
|
||||
#endif /* not __svr4__ */
|
@ -106,10 +106,7 @@ GCC_3.0 {
|
||||
__bb_trace_ret
|
||||
|
||||
# ??? Symbols that perhaps unused should be nuked.
|
||||
__builtin_saveregs
|
||||
__clear_cache
|
||||
__dummy
|
||||
__empty
|
||||
__eprintf
|
||||
__gcc_bcmp
|
||||
|
||||
|
228
gcc/libgcc2.c
228
gcc/libgcc2.c
@ -1237,234 +1237,6 @@ __gcc_bcmp (const unsigned char *s1, const unsigned char *s2, size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef L__dummy
|
||||
void
|
||||
__dummy (void) {}
|
||||
#endif
|
||||
|
||||
#ifdef L_varargs
|
||||
#ifdef __i860__
|
||||
#if defined(__svr4__) || defined(__alliant__)
|
||||
asm (" .text");
|
||||
asm (" .align 4");
|
||||
|
||||
/* The Alliant needs the added underscore. */
|
||||
asm (".globl __builtin_saveregs");
|
||||
asm ("__builtin_saveregs:");
|
||||
asm (".globl ___builtin_saveregs");
|
||||
asm ("___builtin_saveregs:");
|
||||
|
||||
asm (" andnot 0x0f,%sp,%sp"); /* round down to 16-byte boundary */
|
||||
asm (" adds -96,%sp,%sp"); /* allocate stack space for reg save
|
||||
area and also for a new va_list
|
||||
structure */
|
||||
/* Save all argument registers in the arg reg save area. The
|
||||
arg reg save area must have the following layout (according
|
||||
to the svr4 ABI):
|
||||
|
||||
struct {
|
||||
union {
|
||||
float freg[8];
|
||||
double dreg[4];
|
||||
} float_regs;
|
||||
long ireg[12];
|
||||
};
|
||||
*/
|
||||
|
||||
asm (" fst.q %f8, 0(%sp)"); /* save floating regs (f8-f15) */
|
||||
asm (" fst.q %f12,16(%sp)");
|
||||
|
||||
asm (" st.l %r16,32(%sp)"); /* save integer regs (r16-r27) */
|
||||
asm (" st.l %r17,36(%sp)");
|
||||
asm (" st.l %r18,40(%sp)");
|
||||
asm (" st.l %r19,44(%sp)");
|
||||
asm (" st.l %r20,48(%sp)");
|
||||
asm (" st.l %r21,52(%sp)");
|
||||
asm (" st.l %r22,56(%sp)");
|
||||
asm (" st.l %r23,60(%sp)");
|
||||
asm (" st.l %r24,64(%sp)");
|
||||
asm (" st.l %r25,68(%sp)");
|
||||
asm (" st.l %r26,72(%sp)");
|
||||
asm (" st.l %r27,76(%sp)");
|
||||
|
||||
asm (" adds 80,%sp,%r16"); /* compute the address of the new
|
||||
va_list structure. Put in into
|
||||
r16 so that it will be returned
|
||||
to the caller. */
|
||||
|
||||
/* Initialize all fields of the new va_list structure. This
|
||||
structure looks like:
|
||||
|
||||
typedef struct {
|
||||
unsigned long ireg_used;
|
||||
unsigned long freg_used;
|
||||
long *reg_base;
|
||||
long *mem_ptr;
|
||||
} va_list;
|
||||
*/
|
||||
|
||||
asm (" st.l %r0, 0(%r16)"); /* nfixed */
|
||||
asm (" st.l %r0, 4(%r16)"); /* nfloating */
|
||||
asm (" st.l %sp, 8(%r16)"); /* __va_ctl points to __va_struct. */
|
||||
asm (" bri %r1"); /* delayed return */
|
||||
asm (" st.l %r28,12(%r16)"); /* pointer to overflow args */
|
||||
|
||||
#else /* not __svr4__ */
|
||||
#if defined(__PARAGON__)
|
||||
/*
|
||||
* we'll use SVR4-ish varargs but need SVR3.2 assembler syntax,
|
||||
* and we stand a better chance of hooking into libraries
|
||||
* compiled by PGI. [andyp@ssd.intel.com]
|
||||
*/
|
||||
asm (" .text");
|
||||
asm (" .align 4");
|
||||
asm (".globl __builtin_saveregs");
|
||||
asm ("__builtin_saveregs:");
|
||||
asm (".globl ___builtin_saveregs");
|
||||
asm ("___builtin_saveregs:");
|
||||
|
||||
asm (" andnot 0x0f,sp,sp"); /* round down to 16-byte boundary */
|
||||
asm (" adds -96,sp,sp"); /* allocate stack space for reg save
|
||||
area and also for a new va_list
|
||||
structure */
|
||||
/* Save all argument registers in the arg reg save area. The
|
||||
arg reg save area must have the following layout (according
|
||||
to the svr4 ABI):
|
||||
|
||||
struct {
|
||||
union {
|
||||
float freg[8];
|
||||
double dreg[4];
|
||||
} float_regs;
|
||||
long ireg[12];
|
||||
};
|
||||
*/
|
||||
|
||||
asm (" fst.q f8, 0(sp)");
|
||||
asm (" fst.q f12,16(sp)");
|
||||
asm (" st.l r16,32(sp)");
|
||||
asm (" st.l r17,36(sp)");
|
||||
asm (" st.l r18,40(sp)");
|
||||
asm (" st.l r19,44(sp)");
|
||||
asm (" st.l r20,48(sp)");
|
||||
asm (" st.l r21,52(sp)");
|
||||
asm (" st.l r22,56(sp)");
|
||||
asm (" st.l r23,60(sp)");
|
||||
asm (" st.l r24,64(sp)");
|
||||
asm (" st.l r25,68(sp)");
|
||||
asm (" st.l r26,72(sp)");
|
||||
asm (" st.l r27,76(sp)");
|
||||
|
||||
asm (" adds 80,sp,r16"); /* compute the address of the new
|
||||
va_list structure. Put in into
|
||||
r16 so that it will be returned
|
||||
to the caller. */
|
||||
|
||||
/* Initialize all fields of the new va_list structure. This
|
||||
structure looks like:
|
||||
|
||||
typedef struct {
|
||||
unsigned long ireg_used;
|
||||
unsigned long freg_used;
|
||||
long *reg_base;
|
||||
long *mem_ptr;
|
||||
} va_list;
|
||||
*/
|
||||
|
||||
asm (" st.l r0, 0(r16)"); /* nfixed */
|
||||
asm (" st.l r0, 4(r16)"); /* nfloating */
|
||||
asm (" st.l sp, 8(r16)"); /* __va_ctl points to __va_struct. */
|
||||
asm (" bri r1"); /* delayed return */
|
||||
asm (" st.l r28,12(r16)"); /* pointer to overflow args */
|
||||
#else /* not __PARAGON__ */
|
||||
asm (" .text");
|
||||
asm (" .align 4");
|
||||
|
||||
asm (".globl ___builtin_saveregs");
|
||||
asm ("___builtin_saveregs:");
|
||||
asm (" mov sp,r30");
|
||||
asm (" andnot 0x0f,sp,sp");
|
||||
asm (" adds -96,sp,sp"); /* allocate sufficient space on the stack */
|
||||
|
||||
/* Fill in the __va_struct. */
|
||||
asm (" st.l r16, 0(sp)"); /* save integer regs (r16-r27) */
|
||||
asm (" st.l r17, 4(sp)"); /* int fixed[12] */
|
||||
asm (" st.l r18, 8(sp)");
|
||||
asm (" st.l r19,12(sp)");
|
||||
asm (" st.l r20,16(sp)");
|
||||
asm (" st.l r21,20(sp)");
|
||||
asm (" st.l r22,24(sp)");
|
||||
asm (" st.l r23,28(sp)");
|
||||
asm (" st.l r24,32(sp)");
|
||||
asm (" st.l r25,36(sp)");
|
||||
asm (" st.l r26,40(sp)");
|
||||
asm (" st.l r27,44(sp)");
|
||||
|
||||
asm (" fst.q f8, 48(sp)"); /* save floating regs (f8-f15) */
|
||||
asm (" fst.q f12,64(sp)"); /* int floating[8] */
|
||||
|
||||
/* Fill in the __va_ctl. */
|
||||
asm (" st.l sp, 80(sp)"); /* __va_ctl points to __va_struct. */
|
||||
asm (" st.l r28,84(sp)"); /* pointer to more args */
|
||||
asm (" st.l r0, 88(sp)"); /* nfixed */
|
||||
asm (" st.l r0, 92(sp)"); /* nfloating */
|
||||
|
||||
asm (" adds 80,sp,r16"); /* return address of the __va_ctl. */
|
||||
asm (" bri r1");
|
||||
asm (" mov r30,sp");
|
||||
/* recover stack and pass address to start
|
||||
of data. */
|
||||
#endif /* not __PARAGON__ */
|
||||
#endif /* not __svr4__ */
|
||||
#else /* not __i860__ */
|
||||
#ifdef __sparc__
|
||||
asm (".global __builtin_saveregs");
|
||||
asm ("__builtin_saveregs:");
|
||||
asm (".global ___builtin_saveregs");
|
||||
asm ("___builtin_saveregs:");
|
||||
#ifdef NEED_PROC_COMMAND
|
||||
asm (".proc 020");
|
||||
#endif
|
||||
asm ("st %i0,[%fp+68]");
|
||||
asm ("st %i1,[%fp+72]");
|
||||
asm ("st %i2,[%fp+76]");
|
||||
asm ("st %i3,[%fp+80]");
|
||||
asm ("st %i4,[%fp+84]");
|
||||
asm ("retl");
|
||||
asm ("st %i5,[%fp+88]");
|
||||
#ifdef NEED_TYPE_COMMAND
|
||||
asm (".type __builtin_saveregs,#function");
|
||||
asm (".size __builtin_saveregs,.-__builtin_saveregs");
|
||||
#endif
|
||||
#else /* not __sparc__ */
|
||||
#if defined(__MIPSEL__) | defined(__R3000__) | defined(__R2000__) | defined(__mips__)
|
||||
|
||||
asm (" .text");
|
||||
#ifdef __mips16
|
||||
asm (" .set nomips16");
|
||||
#endif
|
||||
asm (" .ent __builtin_saveregs");
|
||||
asm (" .globl __builtin_saveregs");
|
||||
asm ("__builtin_saveregs:");
|
||||
asm (" sw $4,0($30)");
|
||||
asm (" sw $5,4($30)");
|
||||
asm (" sw $6,8($30)");
|
||||
asm (" sw $7,12($30)");
|
||||
asm (" j $31");
|
||||
asm (" .end __builtin_saveregs");
|
||||
#else /* not __mips__, etc. */
|
||||
|
||||
void * ATTRIBUTE_NORETURN
|
||||
__builtin_saveregs ()
|
||||
{
|
||||
abort ();
|
||||
}
|
||||
|
||||
#endif /* not __mips__ */
|
||||
#endif /* not __sparc__ */
|
||||
#endif /* not __i860__ */
|
||||
#endif
|
||||
|
||||
#ifdef L_eprintf
|
||||
|
@ -23,8 +23,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#define __LIBGCC2_H__
|
||||
|
||||
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
|
||||
extern void *__builtin_saveregs (void);
|
||||
extern void __dummy (void);
|
||||
extern void __clear_cache (char *, char *);
|
||||
extern void __eprintf (const char *, const char *, unsigned int, const char *)
|
||||
__attribute__ ((__noreturn__));
|
||||
|
Loading…
Reference in New Issue
Block a user