expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX.
* expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX. * config/arm/pe.c (arm_pe_return_in_memory): Use host_integerp and int_bit_position. * config/mips/mips.c (function_arg): Likewise; also remove cast and make variables unsigned or HOST_WIDE_INT and use tree_low_cst. (mips_function_value): Use int_byte_position and make HOST_WIDE_INT. * config/mips/abi64.h (SETUP_INCOMING_VARARGS): Offsets are unsigned. * config/mips/mips.h (BITS_PER_WORD, UNITS_PER_WORD): Cast to unsigned. (UNITS_PER_FPREG, INT_TYPE_SIZE, LONG_TYPE_SIZE): Likewise. (POINTER_SIZE, POINTER_BOUNDARY,PARM_BOUNDARY): Likewise. (GP_REG_P, FP_REG_P, MD_REG_P, ST_REG_P): Ensure subtraction signed. (struct mips_arg): arg_number, arg_words, fp_arg_words, and num_adjusts now unsigned. (FUNCTION_ARG_BOUNDARY): Remove unneeded cast. * config/sparc/sparc.c (struct function_arg_record_value_parms): NREGS now unsigned. (function_arg_record_value_1): STARTBITPOS arg now HOST_WIDE_INT as is BITPOS variable; use host_integerp and int_bit_position. (function_arg_record_value_2): Likewise. (function_arg_record_value_3): Arg BITPOS now HOST_WIDE_INT. Variable REGNO now unsigned. (function_arg_record_value): NREGS now unsigned. From-SVN: r32748
This commit is contained in:
parent
210ee0dd95
commit
751312371e
|
@ -1,7 +1,33 @@
|
||||||
|
Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||||
|
|
||||||
|
* expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX.
|
||||||
|
* config/arm/pe.c (arm_pe_return_in_memory): Use host_integerp and
|
||||||
|
int_bit_position.
|
||||||
|
* config/mips/mips.c (function_arg): Likewise; also remove cast
|
||||||
|
and make variables unsigned or HOST_WIDE_INT and use tree_low_cst.
|
||||||
|
(mips_function_value): Use int_byte_position and make HOST_WIDE_INT.
|
||||||
|
* config/mips/abi64.h (SETUP_INCOMING_VARARGS): Offsets are unsigned.
|
||||||
|
* config/mips/mips.h (BITS_PER_WORD, UNITS_PER_WORD): Cast to unsigned.
|
||||||
|
(UNITS_PER_FPREG, INT_TYPE_SIZE, LONG_TYPE_SIZE): Likewise.
|
||||||
|
(POINTER_SIZE, POINTER_BOUNDARY,PARM_BOUNDARY): Likewise.
|
||||||
|
(GP_REG_P, FP_REG_P, MD_REG_P, ST_REG_P): Ensure subtraction signed.
|
||||||
|
(struct mips_arg): arg_number, arg_words, fp_arg_words, and
|
||||||
|
num_adjusts now unsigned.
|
||||||
|
(FUNCTION_ARG_BOUNDARY): Remove unneeded cast.
|
||||||
|
* config/sparc/sparc.c (struct function_arg_record_value_parms):
|
||||||
|
NREGS now unsigned.
|
||||||
|
(function_arg_record_value_1): STARTBITPOS arg now HOST_WIDE_INT
|
||||||
|
as is BITPOS variable; use host_integerp and int_bit_position.
|
||||||
|
(function_arg_record_value_2): Likewise.
|
||||||
|
(function_arg_record_value_3): Arg BITPOS now HOST_WIDE_INT.
|
||||||
|
Variable REGNO now unsigned.
|
||||||
|
(function_arg_record_value): NREGS now unsigned.
|
||||||
|
|
||||||
2000-03-26 Bernd Schmidt <bernds@cygnus.co.uk>
|
2000-03-26 Bernd Schmidt <bernds@cygnus.co.uk>
|
||||||
|
|
||||||
* jump.c (mark_all_labels): Handle CALL_PLACEHOLDERs.
|
* jump.c (mark_all_labels): Handle CALL_PLACEHOLDERs.
|
||||||
|
|
||||||
|
|
||||||
Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||||
|
|
||||||
* Rework fields used to describe positions of bitfields and
|
* Rework fields used to describe positions of bitfields and
|
||||||
|
|
|
@ -474,8 +474,10 @@ arm_pe_return_in_memory (type)
|
||||||
if (TREE_CODE (field) == FIELD_DECL
|
if (TREE_CODE (field) == FIELD_DECL
|
||||||
&& ! TREE_STATIC (field)
|
&& ! TREE_STATIC (field)
|
||||||
&& (! DECL_BIT_FIELD_TYPE (field)
|
&& (! DECL_BIT_FIELD_TYPE (field)
|
||||||
|| (TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))
|
|| (host_integerp (DECL_SIZE (field), 1)
|
||||||
+ TREE_INT_CST_LOW (DECL_SIZE (field))) > 32))
|
&& host_integerp (bit_position (field), 1)
|
||||||
|
&& 32 < (int_bit_position (field)
|
||||||
|
+ tree_low_cst (DECL_SIZE (field), 1)))))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -105,19 +105,21 @@ extern struct rtx_def *mips_function_value PARAMS ((union tree_node *, union tre
|
||||||
For stdarg, we do not need to save the current argument, because it
|
For stdarg, we do not need to save the current argument, because it
|
||||||
is a real argument. */
|
is a real argument. */
|
||||||
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
|
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
|
||||||
{ int mips_off = (! current_function_varargs) && (! (CUM).last_arg_fp); \
|
{ unsigned int mips_off \
|
||||||
int mips_fp_off = (! current_function_varargs) && ((CUM).last_arg_fp); \
|
= (! current_function_varargs) && (! (CUM).last_arg_fp); \
|
||||||
|
unsigned int mips_fp_off \
|
||||||
|
= (! current_function_varargs) && ((CUM).last_arg_fp); \
|
||||||
if (((mips_abi != ABI_32 && mips_abi != ABI_O64) \
|
if (((mips_abi != ABI_32 && mips_abi != ABI_O64) \
|
||||||
&& (CUM).arg_words < MAX_ARGS_IN_REGISTERS - mips_off) \
|
&& (CUM).arg_words < MAX_ARGS_IN_REGISTERS - mips_off) \
|
||||||
|| (mips_abi == ABI_EABI \
|
|| (mips_abi == ABI_EABI \
|
||||||
&& ! TARGET_SOFT_FLOAT \
|
&& ! TARGET_SOFT_FLOAT \
|
||||||
&& (CUM).fp_arg_words < MAX_ARGS_IN_REGISTERS - mips_fp_off)) \
|
&& (CUM).fp_arg_words < MAX_ARGS_IN_REGISTERS - mips_fp_off)) \
|
||||||
{ \
|
{ \
|
||||||
int mips_save_gp_regs = \
|
int mips_save_gp_regs \
|
||||||
MAX_ARGS_IN_REGISTERS - (CUM).arg_words - mips_off; \
|
= MAX_ARGS_IN_REGISTERS - (CUM).arg_words - mips_off; \
|
||||||
int mips_save_fp_regs = \
|
int mips_save_fp_regs \
|
||||||
(mips_abi != ABI_EABI ? 0 \
|
= (mips_abi != ABI_EABI ? 0 \
|
||||||
: MAX_ARGS_IN_REGISTERS - (CUM).fp_arg_words - mips_fp_off); \
|
: MAX_ARGS_IN_REGISTERS - (CUM).fp_arg_words - mips_fp_off); \
|
||||||
\
|
\
|
||||||
if (mips_save_gp_regs < 0) \
|
if (mips_save_gp_regs < 0) \
|
||||||
mips_save_gp_regs = 0; \
|
mips_save_gp_regs = 0; \
|
||||||
|
|
|
@ -3801,7 +3801,7 @@ function_arg (cum, mode, type, named)
|
||||||
|
|
||||||
/* Drops through. */
|
/* Drops through. */
|
||||||
case BLKmode:
|
case BLKmode:
|
||||||
if (type != (tree)0 && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD
|
if (type != NULL_TREE && TYPE_ALIGN (type) > BITS_PER_WORD
|
||||||
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
|
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
|
||||||
cum->arg_words += (cum->arg_words & 1);
|
cum->arg_words += (cum->arg_words & 1);
|
||||||
regbase = GP_ARG_FIRST;
|
regbase = GP_ARG_FIRST;
|
||||||
|
@ -3833,7 +3833,8 @@ function_arg (cum, mode, type, named)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (! type || TREE_CODE (type) != RECORD_TYPE || mips_abi == ABI_32
|
if (! type || TREE_CODE (type) != RECORD_TYPE || mips_abi == ABI_32
|
||||||
|| mips_abi == ABI_EABI || mips_abi == ABI_O64 || ! named)
|
|| mips_abi == ABI_EABI || mips_abi == ABI_O64 || ! named
|
||||||
|
|| ! host_integerp (TYPE_SIZE_UNIT (type), 1))
|
||||||
ret = gen_rtx_REG (mode, regbase + *arg_words + bias);
|
ret = gen_rtx_REG (mode, regbase + *arg_words + bias);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3847,8 +3848,8 @@ function_arg (cum, mode, type, named)
|
||||||
if (TREE_CODE (field) == FIELD_DECL
|
if (TREE_CODE (field) == FIELD_DECL
|
||||||
&& TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
&& TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
||||||
&& TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD
|
&& TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD
|
||||||
&& (TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))
|
&& host_integerp (bit_position (field), 0)
|
||||||
% BITS_PER_WORD == 0))
|
&& int_bit_position (field) % BITS_PER_WORD == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* If the whole struct fits a DFmode register,
|
/* If the whole struct fits a DFmode register,
|
||||||
|
@ -3859,15 +3860,16 @@ function_arg (cum, mode, type, named)
|
||||||
{
|
{
|
||||||
/* Now handle the special case by returning a PARALLEL
|
/* Now handle the special case by returning a PARALLEL
|
||||||
indicating where each 64 bit chunk goes. */
|
indicating where each 64 bit chunk goes. */
|
||||||
int chunks;
|
unsigned int chunks;
|
||||||
int bitpos;
|
HOST_WIDE_INT bitpos;
|
||||||
int regno;
|
unsigned int regno;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* ??? If this is a packed structure, then the last hunk won't
|
/* ??? If this is a packed structure, then the last hunk won't
|
||||||
be 64 bits. */
|
be 64 bits. */
|
||||||
|
|
||||||
chunks = TREE_INT_CST_LOW (TYPE_SIZE (type)) / BITS_PER_WORD;
|
chunks
|
||||||
|
= tree_low_cst (TYPE_SIZE_UNIT (type), 1) / UNITS_PER_WORD;
|
||||||
if (chunks + *arg_words + bias > MAX_ARGS_IN_REGISTERS)
|
if (chunks + *arg_words + bias > MAX_ARGS_IN_REGISTERS)
|
||||||
chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias;
|
chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias;
|
||||||
|
|
||||||
|
@ -3884,12 +3886,11 @@ function_arg (cum, mode, type, named)
|
||||||
|
|
||||||
for (; field; field = TREE_CHAIN (field))
|
for (; field; field = TREE_CHAIN (field))
|
||||||
if (TREE_CODE (field) == FIELD_DECL
|
if (TREE_CODE (field) == FIELD_DECL
|
||||||
&& (TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))
|
&& int_bit_position (field) >= bitpos)
|
||||||
>= bitpos))
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (field
|
if (field
|
||||||
&& TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field)) == bitpos
|
&& int_bit_position (field) == bitpos
|
||||||
&& TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
&& TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
||||||
&& TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD)
|
&& TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD)
|
||||||
reg = gen_rtx_REG (DFmode,
|
reg = gen_rtx_REG (DFmode,
|
||||||
|
@ -7417,10 +7418,8 @@ mips_function_value (valtype, func)
|
||||||
= TYPE_MODE (TREE_TYPE (fields[0]));
|
= TYPE_MODE (TREE_TYPE (fields[0]));
|
||||||
enum machine_mode second_mode
|
enum machine_mode second_mode
|
||||||
= TYPE_MODE (TREE_TYPE (fields[1]));
|
= TYPE_MODE (TREE_TYPE (fields[1]));
|
||||||
int first_offset
|
HOST_WIDE_INT first_offset = int_byte_position (fields[0]);
|
||||||
= TREE_INT_CST_LOW (DECL_FIELD_BITPOS (fields[0]));
|
HOST_WIDE_INT second_offset = int_byte_position (fields[1]);
|
||||||
int second_offset
|
|
||||||
= TREE_INT_CST_LOW (DECL_FIELD_BITPOS (fields[1]));
|
|
||||||
|
|
||||||
return gen_rtx_PARALLEL
|
return gen_rtx_PARALLEL
|
||||||
(mode,
|
(mode,
|
||||||
|
@ -7428,13 +7427,11 @@ mips_function_value (valtype, func)
|
||||||
gen_rtx_EXPR_LIST (VOIDmode,
|
gen_rtx_EXPR_LIST (VOIDmode,
|
||||||
gen_rtx_REG (first_mode,
|
gen_rtx_REG (first_mode,
|
||||||
FP_RETURN),
|
FP_RETURN),
|
||||||
GEN_INT (first_offset
|
GEN_INT (first_offset)),
|
||||||
/ BITS_PER_UNIT)),
|
|
||||||
gen_rtx_EXPR_LIST (VOIDmode,
|
gen_rtx_EXPR_LIST (VOIDmode,
|
||||||
gen_rtx_REG (second_mode,
|
gen_rtx_REG (second_mode,
|
||||||
FP_RETURN + 2),
|
FP_RETURN + 2),
|
||||||
GEN_INT (second_offset
|
GEN_INT (second_offset))));
|
||||||
/ BITS_PER_UNIT))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1295,20 +1295,20 @@ do { \
|
||||||
Note that this is not necessarily the width of data type `int';
|
Note that this is not necessarily the width of data type `int';
|
||||||
if using 16-bit ints on a 68000, this would still be 32.
|
if using 16-bit ints on a 68000, this would still be 32.
|
||||||
But on a machine with 16-bit registers, this would be 16. */
|
But on a machine with 16-bit registers, this would be 16. */
|
||||||
#define BITS_PER_WORD (TARGET_64BIT ? 64 : 32)
|
#define BITS_PER_WORD ((unsigned int) (TARGET_64BIT ? 64 : 32))
|
||||||
#define MAX_BITS_PER_WORD 64
|
#define MAX_BITS_PER_WORD 64
|
||||||
|
|
||||||
/* Width of a word, in units (bytes). */
|
/* Width of a word, in units (bytes). */
|
||||||
#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)
|
#define UNITS_PER_WORD ((unsigned int) (TARGET_64BIT ? 8 : 4))
|
||||||
#define MIN_UNITS_PER_WORD 4
|
#define MIN_UNITS_PER_WORD 4
|
||||||
|
|
||||||
/* For MIPS, width of a floating point register. */
|
/* For MIPS, width of a floating point register. */
|
||||||
#define UNITS_PER_FPREG (TARGET_FLOAT64 ? 8 : 4)
|
#define UNITS_PER_FPREG ((unsigned int) (TARGET_FLOAT64 ? 8 : 4))
|
||||||
|
|
||||||
/* A C expression for the size in bits of the type `int' on the
|
/* A C expression for the size in bits of the type `int' on the
|
||||||
target machine. If you don't define this, the default is one
|
target machine. If you don't define this, the default is one
|
||||||
word. */
|
word. */
|
||||||
#define INT_TYPE_SIZE (TARGET_INT64 ? 64 : 32)
|
#define INT_TYPE_SIZE ((unsigned int) (TARGET_INT64 ? 64 : 32))
|
||||||
#define MAX_INT_TYPE_SIZE 64
|
#define MAX_INT_TYPE_SIZE 64
|
||||||
|
|
||||||
/* Tell the preprocessor the maximum size of wchar_t. */
|
/* Tell the preprocessor the maximum size of wchar_t. */
|
||||||
|
@ -1327,7 +1327,7 @@ do { \
|
||||||
/* A C expression for the size in bits of the type `long' on the
|
/* A C expression for the size in bits of the type `long' on the
|
||||||
target machine. If you don't define this, the default is one
|
target machine. If you don't define this, the default is one
|
||||||
word. */
|
word. */
|
||||||
#define LONG_TYPE_SIZE (TARGET_LONG64 ? 64 : 32)
|
#define LONG_TYPE_SIZE ((unsigned int) (TARGET_LONG64 ? 64 : 32))
|
||||||
#define MAX_LONG_TYPE_SIZE 64
|
#define MAX_LONG_TYPE_SIZE 64
|
||||||
|
|
||||||
/* A C expression for the size in bits of the type `long long' on the
|
/* A C expression for the size in bits of the type `long long' on the
|
||||||
|
@ -1359,14 +1359,14 @@ do { \
|
||||||
/* Width in bits of a pointer.
|
/* Width in bits of a pointer.
|
||||||
See also the macro `Pmode' defined below. */
|
See also the macro `Pmode' defined below. */
|
||||||
#ifndef POINTER_SIZE
|
#ifndef POINTER_SIZE
|
||||||
#define POINTER_SIZE (Pmode == DImode ? 64 : 32)
|
#define POINTER_SIZE ((unsigned int) (Pmode == DImode ? 64 : 32))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Allocation boundary (in *bits*) for storing pointers in memory. */
|
/* Allocation boundary (in *bits*) for storing pointers in memory. */
|
||||||
#define POINTER_BOUNDARY (Pmode == DImode ? 64 : 32)
|
#define POINTER_BOUNDARY ((unsigned int) (Pmode == DImode ? 64 : 32))
|
||||||
|
|
||||||
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
||||||
#define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32)
|
#define PARM_BOUNDARY ((unsigned int) (TARGET_64BIT ? 64 : 32))
|
||||||
|
|
||||||
/* Allocation boundary (in *bits*) for the code of a function. */
|
/* Allocation boundary (in *bits*) for the code of a function. */
|
||||||
#define FUNCTION_BOUNDARY 32
|
#define FUNCTION_BOUNDARY 32
|
||||||
|
@ -1421,9 +1421,7 @@ do { \
|
||||||
|
|
||||||
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
|
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
|
||||||
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
|
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
|
||||||
&& (ALIGN) < BITS_PER_WORD \
|
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
|
||||||
? BITS_PER_WORD \
|
|
||||||
: (ALIGN))
|
|
||||||
|
|
||||||
/* If defined, a C expression to compute the alignment for a static
|
/* If defined, a C expression to compute the alignment for a static
|
||||||
variable. TYPE is the data type, and ALIGN is the alignment that
|
variable. TYPE is the data type, and ALIGN is the alignment that
|
||||||
|
@ -1582,12 +1580,16 @@ do { \
|
||||||
should be used instead. */
|
should be used instead. */
|
||||||
#define FPSW_REGNUM ST_REG_FIRST
|
#define FPSW_REGNUM ST_REG_FIRST
|
||||||
|
|
||||||
#define GP_REG_P(REGNO) ((unsigned) ((REGNO) - GP_REG_FIRST) < GP_REG_NUM)
|
#define GP_REG_P(REGNO) \
|
||||||
|
((unsigned int) ((int) (REGNO) - GP_REG_FIRST) < GP_REG_NUM)
|
||||||
#define M16_REG_P(REGNO) \
|
#define M16_REG_P(REGNO) \
|
||||||
(((REGNO) >= 2 && (REGNO) <= 7) || (REGNO) == 16 || (REGNO) == 17)
|
(((REGNO) >= 2 && (REGNO) <= 7) || (REGNO) == 16 || (REGNO) == 17)
|
||||||
#define FP_REG_P(REGNO) ((unsigned) ((REGNO) - FP_REG_FIRST) < FP_REG_NUM)
|
#define FP_REG_P(REGNO) \
|
||||||
#define MD_REG_P(REGNO) ((unsigned) ((REGNO) - MD_REG_FIRST) < MD_REG_NUM)
|
((unsigned int) ((int) (REGNO) - FP_REG_FIRST) < FP_REG_NUM)
|
||||||
#define ST_REG_P(REGNO) ((unsigned) ((REGNO) - ST_REG_FIRST) < ST_REG_NUM)
|
#define MD_REG_P(REGNO) \
|
||||||
|
((unsigned int) ((int) (REGNO) - MD_REG_FIRST) < MD_REG_NUM)
|
||||||
|
#define ST_REG_P(REGNO) \
|
||||||
|
((unsigned int) ((int) (REGNO) - ST_REG_FIRST) < ST_REG_NUM)
|
||||||
|
|
||||||
/* Return number of consecutive hard regs needed starting at reg REGNO
|
/* Return number of consecutive hard regs needed starting at reg REGNO
|
||||||
to hold something of mode MODE.
|
to hold something of mode MODE.
|
||||||
|
@ -2453,12 +2455,12 @@ extern struct mips_frame_info current_frame_info;
|
||||||
|
|
||||||
typedef struct mips_args {
|
typedef struct mips_args {
|
||||||
int gp_reg_found; /* whether a gp register was found yet */
|
int gp_reg_found; /* whether a gp register was found yet */
|
||||||
int arg_number; /* argument number */
|
unsigned int arg_number; /* argument number */
|
||||||
int arg_words; /* # total words the arguments take */
|
unsigned int arg_words; /* # total words the arguments take */
|
||||||
int fp_arg_words; /* # words for FP args (MIPS_EABI only) */
|
unsigned int fp_arg_words; /* # words for FP args (MIPS_EABI only) */
|
||||||
int last_arg_fp; /* nonzero if last arg was FP (EABI only) */
|
int last_arg_fp; /* nonzero if last arg was FP (EABI only) */
|
||||||
int fp_code; /* Mode of FP arguments (mips16) */
|
int fp_code; /* Mode of FP arguments (mips16) */
|
||||||
int num_adjusts; /* number of adjustments made */
|
unsigned int num_adjusts; /* number of adjustments made */
|
||||||
/* Adjustments made to args pass in regs. */
|
/* Adjustments made to args pass in regs. */
|
||||||
/* ??? The size is doubled to work around a
|
/* ??? The size is doubled to work around a
|
||||||
bug in the code that sets the adjustments
|
bug in the code that sets the adjustments
|
||||||
|
@ -2511,7 +2513,7 @@ typedef struct mips_args {
|
||||||
|
|
||||||
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
|
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
|
||||||
(((TYPE) != 0) \
|
(((TYPE) != 0) \
|
||||||
? ((TYPE_ALIGN(TYPE) <= (unsigned)PARM_BOUNDARY) \
|
? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY) \
|
||||||
? PARM_BOUNDARY \
|
? PARM_BOUNDARY \
|
||||||
: TYPE_ALIGN(TYPE)) \
|
: TYPE_ALIGN(TYPE)) \
|
||||||
: ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \
|
: ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \
|
||||||
|
|
|
@ -4057,22 +4057,25 @@ struct function_arg_record_value_parms
|
||||||
{
|
{
|
||||||
rtx ret;
|
rtx ret;
|
||||||
int slotno, named, regbase;
|
int slotno, named, regbase;
|
||||||
int nregs, intoffset;
|
unsigned int nregs;
|
||||||
|
int intoffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void function_arg_record_value_3
|
static void function_arg_record_value_3
|
||||||
PARAMS ((int, struct function_arg_record_value_parms *));
|
PARAMS ((HOST_WIDE_INT, struct function_arg_record_value_parms *));
|
||||||
static void function_arg_record_value_2
|
static void function_arg_record_value_2
|
||||||
PARAMS ((tree, int, struct function_arg_record_value_parms *));
|
PARAMS ((tree, HOST_WIDE_INT,
|
||||||
|
struct function_arg_record_value_parms *));
|
||||||
static void function_arg_record_value_1
|
static void function_arg_record_value_1
|
||||||
PARAMS ((tree, int, struct function_arg_record_value_parms *));
|
PARAMS ((tree, HOST_WIDE_INT,
|
||||||
|
struct function_arg_record_value_parms *));
|
||||||
static rtx function_arg_record_value
|
static rtx function_arg_record_value
|
||||||
PARAMS ((tree, enum machine_mode, int, int, int));
|
PARAMS ((tree, enum machine_mode, int, int, int));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
function_arg_record_value_1 (type, startbitpos, parms)
|
function_arg_record_value_1 (type, startbitpos, parms)
|
||||||
tree type;
|
tree type;
|
||||||
int startbitpos;
|
HOST_WIDE_INT startbitpos;
|
||||||
struct function_arg_record_value_parms *parms;
|
struct function_arg_record_value_parms *parms;
|
||||||
{
|
{
|
||||||
tree field;
|
tree field;
|
||||||
|
@ -4100,15 +4103,16 @@ function_arg_record_value_1 (type, startbitpos, parms)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (field) == FIELD_DECL)
|
if (TREE_CODE (field) == FIELD_DECL)
|
||||||
{
|
{
|
||||||
int bitpos = startbitpos;
|
HOST_WIDE_INT bitpos = startbitpos;
|
||||||
if (DECL_FIELD_BITPOS (field))
|
|
||||||
bitpos += TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field));
|
if (DECL_SIZE (field) != 0
|
||||||
|
&& host_integerp (bit_position (field), 1))
|
||||||
|
bitpos += int_bit_position (field);
|
||||||
|
|
||||||
/* ??? FIXME: else assume zero offset. */
|
/* ??? FIXME: else assume zero offset. */
|
||||||
|
|
||||||
if (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE)
|
if (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE)
|
||||||
{
|
function_arg_record_value_1 (TREE_TYPE (field), bitpos, parms);
|
||||||
function_arg_record_value_1 (TREE_TYPE (field), bitpos, parms);
|
|
||||||
}
|
|
||||||
else if (TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
else if (TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
||||||
&& TARGET_FPU
|
&& TARGET_FPU
|
||||||
&& ! packed_p
|
&& ! packed_p
|
||||||
|
@ -4146,15 +4150,17 @@ function_arg_record_value_1 (type, startbitpos, parms)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
function_arg_record_value_3 (bitpos, parms)
|
function_arg_record_value_3 (bitpos, parms)
|
||||||
int bitpos;
|
HOST_WIDE_INT bitpos;
|
||||||
struct function_arg_record_value_parms *parms;
|
struct function_arg_record_value_parms *parms;
|
||||||
{
|
{
|
||||||
enum machine_mode mode;
|
enum machine_mode mode;
|
||||||
int regno, this_slotno, intslots, intoffset;
|
unsigned int regno;
|
||||||
|
int this_slotno, intslots, intoffset;
|
||||||
rtx reg;
|
rtx reg;
|
||||||
|
|
||||||
if (parms->intoffset == -1)
|
if (parms->intoffset == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
intoffset = parms->intoffset;
|
intoffset = parms->intoffset;
|
||||||
parms->intoffset = -1;
|
parms->intoffset = -1;
|
||||||
|
|
||||||
|
@ -4171,10 +4177,8 @@ function_arg_record_value_3 (bitpos, parms)
|
||||||
at the moment but may wish to revisit. */
|
at the moment but may wish to revisit. */
|
||||||
|
|
||||||
if (intoffset % BITS_PER_WORD != 0)
|
if (intoffset % BITS_PER_WORD != 0)
|
||||||
{
|
mode = mode_for_size (BITS_PER_WORD - intoffset % BITS_PER_WORD,
|
||||||
mode = mode_for_size (BITS_PER_WORD - intoffset%BITS_PER_WORD,
|
MODE_INT, 0);
|
||||||
MODE_INT, 0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
mode = word_mode;
|
mode = word_mode;
|
||||||
|
|
||||||
|
@ -4197,7 +4201,7 @@ function_arg_record_value_3 (bitpos, parms)
|
||||||
static void
|
static void
|
||||||
function_arg_record_value_2 (type, startbitpos, parms)
|
function_arg_record_value_2 (type, startbitpos, parms)
|
||||||
tree type;
|
tree type;
|
||||||
int startbitpos;
|
HOST_WIDE_INT startbitpos;
|
||||||
struct function_arg_record_value_parms *parms;
|
struct function_arg_record_value_parms *parms;
|
||||||
{
|
{
|
||||||
tree field;
|
tree field;
|
||||||
|
@ -4216,15 +4220,16 @@ function_arg_record_value_2 (type, startbitpos, parms)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (field) == FIELD_DECL)
|
if (TREE_CODE (field) == FIELD_DECL)
|
||||||
{
|
{
|
||||||
int bitpos = startbitpos;
|
HOST_WIDE_INT bitpos = startbitpos;
|
||||||
if (DECL_FIELD_BITPOS (field))
|
|
||||||
bitpos += TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field));
|
if (DECL_SIZE (field) != 0
|
||||||
|
&& host_integerp (bit_position (field), 1))
|
||||||
|
bitpos += int_bit_position (field);
|
||||||
|
|
||||||
/* ??? FIXME: else assume zero offset. */
|
/* ??? FIXME: else assume zero offset. */
|
||||||
|
|
||||||
if (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE)
|
if (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE)
|
||||||
{
|
function_arg_record_value_2 (TREE_TYPE (field), bitpos, parms);
|
||||||
function_arg_record_value_2 (TREE_TYPE (field), bitpos, parms);
|
|
||||||
}
|
|
||||||
else if (TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
else if (TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
|
||||||
&& TARGET_FPU
|
&& TARGET_FPU
|
||||||
&& ! packed_p
|
&& ! packed_p
|
||||||
|
@ -4261,7 +4266,7 @@ function_arg_record_value (type, mode, slotno, named, regbase)
|
||||||
{
|
{
|
||||||
HOST_WIDE_INT typesize = int_size_in_bytes (type);
|
HOST_WIDE_INT typesize = int_size_in_bytes (type);
|
||||||
struct function_arg_record_value_parms parms;
|
struct function_arg_record_value_parms parms;
|
||||||
int nregs;
|
unsigned int nregs;
|
||||||
|
|
||||||
parms.ret = NULL_RTX;
|
parms.ret = NULL_RTX;
|
||||||
parms.slotno = slotno;
|
parms.slotno = slotno;
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
|
||||||
/* Offset from start of field in OP0. */
|
/* Offset from start of field in OP0. */
|
||||||
unsigned int bit_offset = (WORDS_BIG_ENDIAN
|
unsigned int bit_offset = (WORDS_BIG_ENDIAN
|
||||||
? MAX (0, ((int) bitsize - ((int) i + 1)
|
? MAX (0, ((int) bitsize - ((int) i + 1)
|
||||||
* BITS_PER_WORD))
|
* (int) BITS_PER_WORD))
|
||||||
: (int) i * BITS_PER_WORD);
|
: (int) i * BITS_PER_WORD);
|
||||||
rtx target_part = operand_subword (target, wordnum, 1, VOIDmode);
|
rtx target_part = operand_subword (target, wordnum, 1, VOIDmode);
|
||||||
rtx result_part
|
rtx result_part
|
||||||
|
|
Loading…
Reference in New Issue