Commit bd227acc by Franz Sirl Committed by Richard Henderson

Franz Sirl <Franz.Sirl-kernel@lauterbach.com>

Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
        * rs6000.h (RS6000_VARARGS_OFFSET): Die die die.
        (CUMULATIVE_ARGS): Remove varargs_offset; update commentary.
        * rs6000.c (setup_incoming_varargs): Fix typo last change.
        (init_cumulative_args): Remove varargs_offset references.
        * rs6000/linux.h (NO_IMPLICIT_EXTERN_C): Define.
        (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Undefine.

From-SVN: r26835
parent ccc4ae07
Sat May 8 01:43:02 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* rs6000.h (RS6000_VARARGS_OFFSET): Die die die.
(CUMULATIVE_ARGS): Remove varargs_offset; update commentary.
* rs6000.c (setup_incoming_varargs): Fix typo last change.
(init_cumulative_args): Remove varargs_offset references.
* rs6000/linux.h (NO_IMPLICIT_EXTERN_C): Define.
(MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Undefine.
Sat May 8 01:34:19 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> Sat May 8 01:34:19 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* reload1.c (gen_mode_int): New function. * reload1.c (gen_mode_int): New function.
......
...@@ -22,6 +22,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,6 +22,12 @@ Boston, MA 02111-1307, USA. */
#include "rs6000/sysv4.h" #include "rs6000/sysv4.h"
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES \ #define CPP_PREDEFINES \
"-DPPC -D__ELF__ -Dpowerpc -Acpu(powerpc) -Amachine(powerpc)" "-DPPC -D__ELF__ -Dpowerpc -Acpu(powerpc) -Amachine(powerpc)"
......
...@@ -1258,11 +1258,7 @@ init_cumulative_args (cum, fntype, libname, incoming) ...@@ -1258,11 +1258,7 @@ init_cumulative_args (cum, fntype, libname, incoming)
cum->call_cookie = CALL_NORMAL; cum->call_cookie = CALL_NORMAL;
if (incoming) if (incoming)
{ cum->nargs_prototype = 1000; /* don't return a PARALLEL */
cum->nargs_prototype = 1000; /* don't return a PARALLEL */
if (abi == ABI_V4 || abi == ABI_SOLARIS)
cum->varargs_offset = RS6000_VARARGS_OFFSET;
}
else if (cum->prototype) else if (cum->prototype)
cum->nargs_prototype = (list_length (TYPE_ARG_TYPES (fntype)) - 1 cum->nargs_prototype = (list_length (TYPE_ARG_TYPES (fntype)) - 1
...@@ -1294,9 +1290,6 @@ init_cumulative_args (cum, fntype, libname, incoming) ...@@ -1294,9 +1290,6 @@ init_cumulative_args (cum, fntype, libname, incoming)
tree_code_name[ (int)TREE_CODE (ret_type) ]); tree_code_name[ (int)TREE_CODE (ret_type) ]);
} }
if ((abi == ABI_V4 || abi == ABI_SOLARIS) && incoming)
fprintf (stderr, " varargs = %d, ", cum->varargs_offset);
if (cum->call_cookie & CALL_NT_DLLIMPORT) if (cum->call_cookie & CALL_NT_DLLIMPORT)
fprintf (stderr, " dllimport,"); fprintf (stderr, " dllimport,");
...@@ -1634,7 +1627,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) ...@@ -1634,7 +1627,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
rs6000_sysv_varargs_p = 1; rs6000_sysv_varargs_p = 1;
if (! no_rtl) if (! no_rtl)
save_area = plus_constant (virtual_stack_vars_rtx, save_area = plus_constant (virtual_stack_vars_rtx,
- RS6000_VARARGS_OFFSET); - RS6000_VARARGS_SIZE);
} }
else else
rs6000_sysv_varargs_p = 0; rs6000_sysv_varargs_p = 0;
......
...@@ -1282,11 +1282,6 @@ extern int rs6000_sysv_varargs_p; ...@@ -1282,11 +1282,6 @@ extern int rs6000_sysv_varargs_p;
#define RS6000_VARARGS_SIZE \ #define RS6000_VARARGS_SIZE \
((GP_ARG_NUM_REG * (TARGET_32BIT ? 4 : 8)) + (FP_ARG_NUM_REG * 8) + 8) ((GP_ARG_NUM_REG * (TARGET_32BIT ? 4 : 8)) + (FP_ARG_NUM_REG * 8) + 8)
/* Offset of V.4 varargs area */
#define RS6000_VARARGS_OFFSET \
(RS6000_ALIGN (current_function_outgoing_args_size, 8) \
+ RS6000_SAVE_AREA)
/* Offset within stack frame to start allocating local variables at. /* Offset within stack frame to start allocating local variables at.
If FRAME_GROWS_DOWNWARD, this is the offset to the END of the If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
first local allocated. Otherwise, it is the offset to the BEGINNING first local allocated. Otherwise, it is the offset to the BEGINNING
...@@ -1439,9 +1434,8 @@ extern int rs6000_sysv_varargs_p; ...@@ -1439,9 +1434,8 @@ extern int rs6000_sysv_varargs_p;
floating-point register number, and the third says how many more args we floating-point register number, and the third says how many more args we
have prototype types for. have prototype types for.
The System V.4 varargs/stdarg support requires that this structure's size The varargs/stdarg support requires that this structure's size
be a multiple of sizeof(int), and that WORDS, FREGNO, NARGS_PROTOTYPE, be a multiple of sizeof(int). */
ORIG_NARGS, and VARARGS_OFFSET be the first five ints. */
typedef struct rs6000_args typedef struct rs6000_args
{ {
...@@ -1449,7 +1443,6 @@ typedef struct rs6000_args ...@@ -1449,7 +1443,6 @@ typedef struct rs6000_args
int fregno; /* next available FP register */ int fregno; /* next available FP register */
int nargs_prototype; /* # args left in the current prototype */ int nargs_prototype; /* # args left in the current prototype */
int orig_nargs; /* Original value of nargs_prototype */ int orig_nargs; /* Original value of nargs_prototype */
int varargs_offset; /* offset of the varargs save area */
int prototype; /* Whether a prototype was defined */ int prototype; /* Whether a prototype was defined */
int call_cookie; /* Do special things for this call */ int call_cookie; /* Do special things for this call */
} CUMULATIVE_ARGS; } CUMULATIVE_ARGS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment