Commit c229cba9 by David Edelsohn Committed by Jeff Law

rs6000.h (FUNCTION_ARG_PADDING): Define.

        * rs6000.h (FUNCTION_ARG_PADDING): Define.
        * rs6000.c (function_arg_padding): New function.

From-SVN: r17029
parent b2c59d0b
Tue Dec 9 09:38:58 1997 David Edelsohn <edelsohn@mhpcc.edu>
* rs6000.h (FUNCTION_ARG_PADDING): Define.
* rs6000.c (function_arg_padding): New function.
Tue Dec 9 10:34:21 1997 Manfred Hollstein <manfred@s-direktnet.de> Tue Dec 9 10:34:21 1997 Manfred Hollstein <manfred@s-direktnet.de>
* m68k.c: Include tree.h only once. * m68k.c: Include tree.h only once.
......
...@@ -1167,6 +1167,35 @@ init_cumulative_args (cum, fntype, libname, incoming) ...@@ -1167,6 +1167,35 @@ init_cumulative_args (cum, fntype, libname, incoming)
} }
} }
/* If defined, a C expression which determines whether, and in which
direction, to pad out an argument with extra space. The value
should be of type `enum direction': either `upward' to pad above
the argument, `downward' to pad below, or `none' to inhibit
padding.
For the AIX ABI structs are always stored left shifted in their
argument slot. */
enum direction
function_arg_padding (mode, type)
enum machine_mode mode;
tree type;
{
if (type && TREE_CODE (type) == RECORD_TYPE)
{
return upward;
}
/* This is the default definition. */
return (! BYTES_BIG_ENDIAN
? upward
: ((mode == BLKmode
? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
: GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
? downward : upward));
}
/* If defined, a C expression that gives the alignment boundary, in bits, /* If defined, a C expression that gives the alignment boundary, in bits,
of an argument with the specified mode and type. If it is not defined, of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments. PARM_BOUNDARY is used for all arguments.
......
...@@ -1461,6 +1461,15 @@ typedef struct rs6000_args ...@@ -1461,6 +1461,15 @@ typedef struct rs6000_args
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
function_arg_pass_by_reference(&CUM, MODE, TYPE, NAMED) function_arg_pass_by_reference(&CUM, MODE, TYPE, NAMED)
/* If defined, a C expression which determines whether, and in which
direction, to pad out an argument with extra space. The value
should be of type `enum direction': either `upward' to pad above
the argument, `downward' to pad below, or `none' to inhibit
padding. */
#define FUNCTION_ARG_PADDING(MODE, TYPE) \
function_arg_padding (MODE, TYPE)
/* If defined, a C expression that gives the alignment boundary, in bits, /* If defined, a C expression that gives the alignment boundary, in bits,
of an argument with the specified mode and type. If it is not defined, of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments. */ PARM_BOUNDARY is used for all arguments. */
......
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