rs6000.c (init_cumulative_args): Add and handle LIBCALL argument.
2003-06-18 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * config/rs6000/rs6000.c (init_cumulative_args): Add and handle LIBCALL argument. (function_arg): Handle CALL_LIBCALL flag. * config/rs6000/rs6000-protos.h (init_cumulative_args): Update prototype. * config/rs6000/rs6000.h (CALL_LIBCALL): New macro. (INIT_CUMULATIVE_LIBCALL_ARGS): New macro. (INIT_CUMULATIVE_ARGS): Add LIBCALL argument. (INIT_CUMULATIVE_INCOMING_ARGS): Likewise. From-SVN: r68139
This commit is contained in:
parent
903caebf49
commit
b9599e4675
|
@ -1,3 +1,15 @@
|
||||||
|
2003-06-18 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
|
||||||
|
|
||||||
|
* config/rs6000/rs6000.c (init_cumulative_args): Add and handle LIBCALL
|
||||||
|
argument.
|
||||||
|
(function_arg): Handle CALL_LIBCALL flag.
|
||||||
|
* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
|
||||||
|
prototype.
|
||||||
|
* config/rs6000/rs6000.h (CALL_LIBCALL): New macro.
|
||||||
|
(INIT_CUMULATIVE_LIBCALL_ARGS): New macro.
|
||||||
|
(INIT_CUMULATIVE_ARGS): Add LIBCALL argument.
|
||||||
|
(INIT_CUMULATIVE_INCOMING_ARGS): Likewise.
|
||||||
|
|
||||||
2003-06-18 Neil Booth <neil@daikokuya.co.uk>
|
2003-06-18 Neil Booth <neil@daikokuya.co.uk>
|
||||||
|
|
||||||
* Makefile.in: Update.
|
* Makefile.in: Update.
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#ifdef RTX_CODE
|
#ifdef RTX_CODE
|
||||||
|
|
||||||
#ifdef TREE_CODE
|
#ifdef TREE_CODE
|
||||||
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int));
|
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int, int));
|
||||||
extern void rs6000_va_start PARAMS ((tree, rtx));
|
extern void rs6000_va_start PARAMS ((tree, rtx));
|
||||||
#endif /* TREE_CODE */
|
#endif /* TREE_CODE */
|
||||||
|
|
||||||
|
|
|
@ -3639,11 +3639,12 @@ rs6000_emit_move (dest, source, mode)
|
||||||
so we never return a PARALLEL. */
|
so we never return a PARALLEL. */
|
||||||
|
|
||||||
void
|
void
|
||||||
init_cumulative_args (cum, fntype, libname, incoming)
|
init_cumulative_args (cum, fntype, libname, incoming, libcall)
|
||||||
CUMULATIVE_ARGS *cum;
|
CUMULATIVE_ARGS *cum;
|
||||||
tree fntype;
|
tree fntype;
|
||||||
rtx libname ATTRIBUTE_UNUSED;
|
rtx libname ATTRIBUTE_UNUSED;
|
||||||
int incoming;
|
int incoming;
|
||||||
|
int libcall;
|
||||||
{
|
{
|
||||||
static CUMULATIVE_ARGS zero_cumulative;
|
static CUMULATIVE_ARGS zero_cumulative;
|
||||||
|
|
||||||
|
@ -3652,7 +3653,7 @@ init_cumulative_args (cum, fntype, libname, incoming)
|
||||||
cum->fregno = FP_ARG_MIN_REG;
|
cum->fregno = FP_ARG_MIN_REG;
|
||||||
cum->vregno = ALTIVEC_ARG_MIN_REG;
|
cum->vregno = ALTIVEC_ARG_MIN_REG;
|
||||||
cum->prototype = (fntype && TYPE_ARG_TYPES (fntype));
|
cum->prototype = (fntype && TYPE_ARG_TYPES (fntype));
|
||||||
cum->call_cookie = CALL_NORMAL;
|
cum->call_cookie = libcall ? CALL_LIBCALL : CALL_NORMAL;
|
||||||
cum->sysv_gregno = GP_ARG_MIN_REG;
|
cum->sysv_gregno = GP_ARG_MIN_REG;
|
||||||
cum->stdarg = fntype
|
cum->stdarg = fntype
|
||||||
&& (TYPE_ARG_TYPES (fntype) != 0
|
&& (TYPE_ARG_TYPES (fntype) != 0
|
||||||
|
@ -3901,7 +3902,7 @@ rs6000_spe_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type
|
||||||
|
|
||||||
If this is floating-point and no prototype is specified, we use
|
If this is floating-point and no prototype is specified, we use
|
||||||
both an FP and integer register (or possibly FP reg and stack). Library
|
both an FP and integer register (or possibly FP reg and stack). Library
|
||||||
functions (when TYPE is zero) always have the proper types for args,
|
functions (when CALL_LIBCALL is set) always have the proper types for args,
|
||||||
so we can pass the FP value just in one register. emit_library_function
|
so we can pass the FP value just in one register. emit_library_function
|
||||||
doesn't support PARALLEL anyway. */
|
doesn't support PARALLEL anyway. */
|
||||||
|
|
||||||
|
@ -3922,7 +3923,8 @@ function_arg (cum, mode, type, named)
|
||||||
{
|
{
|
||||||
if (abi == ABI_V4
|
if (abi == ABI_V4
|
||||||
&& cum->nargs_prototype < 0
|
&& cum->nargs_prototype < 0
|
||||||
&& type && (cum->prototype || TARGET_NO_PROTOTYPE))
|
&& (cum->call_cookie & CALL_LIBCALL) == 0
|
||||||
|
&& (cum->prototype || TARGET_NO_PROTOTYPE))
|
||||||
{
|
{
|
||||||
/* For the SPE, we need to crxor CR6 always. */
|
/* For the SPE, we need to crxor CR6 always. */
|
||||||
if (TARGET_SPE_ABI)
|
if (TARGET_SPE_ABI)
|
||||||
|
|
|
@ -1665,6 +1665,7 @@ typedef struct rs6000_stack {
|
||||||
#define CALL_V4_CLEAR_FP_ARGS 0x00000002 /* V.4, no FP args passed */
|
#define CALL_V4_CLEAR_FP_ARGS 0x00000002 /* V.4, no FP args passed */
|
||||||
#define CALL_V4_SET_FP_ARGS 0x00000004 /* V.4, FP args were passed */
|
#define CALL_V4_SET_FP_ARGS 0x00000004 /* V.4, FP args were passed */
|
||||||
#define CALL_LONG 0x00000008 /* always call indirect */
|
#define CALL_LONG 0x00000008 /* always call indirect */
|
||||||
|
#define CALL_LIBCALL 0x00000010 /* libcall */
|
||||||
|
|
||||||
/* 1 if N is a possible register number for a function value
|
/* 1 if N is a possible register number for a function value
|
||||||
as seen by the caller.
|
as seen by the caller.
|
||||||
|
@ -1743,13 +1744,18 @@ typedef struct rs6000_args
|
||||||
For a library call, FNTYPE is 0. */
|
For a library call, FNTYPE is 0. */
|
||||||
|
|
||||||
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
|
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
|
||||||
init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE)
|
init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, FALSE)
|
||||||
|
|
||||||
/* Similar, but when scanning the definition of a procedure. We always
|
/* Similar, but when scanning the definition of a procedure. We always
|
||||||
set NARGS_PROTOTYPE large so we never return an EXPR_LIST. */
|
set NARGS_PROTOTYPE large so we never return an EXPR_LIST. */
|
||||||
|
|
||||||
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,LIBNAME) \
|
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,LIBNAME) \
|
||||||
init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE)
|
init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE, FALSE)
|
||||||
|
|
||||||
|
/* Like INIT_CUMULATIVE_ARGS' but only used for outgoing libcalls. */
|
||||||
|
|
||||||
|
#define INIT_CUMULATIVE_LIBCALL_ARGS(CUM, MODE, LIBNAME) \
|
||||||
|
init_cumulative_args (&CUM, NULL_TREE, LIBNAME, FALSE, TRUE)
|
||||||
|
|
||||||
/* Update the data in CUM to advance over an argument
|
/* Update the data in CUM to advance over an argument
|
||||||
of mode MODE and data type TYPE.
|
of mode MODE and data type TYPE.
|
||||||
|
|
Loading…
Reference in New Issue