* sparc-tdep.c: Replace VALUE_TYPE with value_type.
* v850-tdep.c, sparc64-tdep.c, sh-tdep.c: Ditto.
* sh64-tdep.c, s390-tdep.c, mcore-tdep.c: Ditto.
* h8300-tdep.c, arm-linux-tdep.c, amd64-tdep.c: Ditto.
* hppa-tdep.c, mips-tdep.c, m88k-tdep.c: Ditto.
* m68hc11-tdep.c, m32r-tdep.c, ia64-tdep.c: Ditto.
* frv-tdep.c, cris-tdep.c, avr-tdep.c, alpha-tdep.c: Ditto.
2004-11-12 Andrew Cagney <cagney@gnu.org>
+ * sparc-tdep.c: Replace VALUE_TYPE with value_type.
+ * v850-tdep.c, sparc64-tdep.c, sh-tdep.c: Ditto.
+ * sh64-tdep.c, s390-tdep.c, mcore-tdep.c: Ditto.
+ * h8300-tdep.c, arm-linux-tdep.c, amd64-tdep.c: Ditto.
+ * hppa-tdep.c, mips-tdep.c, m88k-tdep.c: Ditto.
+ * m68hc11-tdep.c, m32r-tdep.c, ia64-tdep.c: Ditto.
+ * frv-tdep.c, cris-tdep.c, avr-tdep.c, alpha-tdep.c: Ditto.
+
Merge VALUE_REGNO and VALUE_FRAME_REGNUM into VALUE_REGNUM.
* value.h (VALUE_REGNO, VALUE_FRAME_REGNUM): Delete.
(VALUE_REGNUM): Define.
for (i = 0, m_arg = alpha_args; i < nargs; i++, m_arg++)
{
struct value *arg = args[i];
- struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+ struct type *arg_type = check_typedef (value_type (arg));
/* Cast argument to long if necessary as the compiler does it too. */
switch (TYPE_CODE (arg_type))
for (i = 0; i < nargs; i++)
{
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
enum amd64_reg_class class[2];
int needed_integer_regs = 0;
/* Write out the arguments to the stack. */
for (i = 0; i < num_stack_args; i++)
{
- struct type *type = VALUE_TYPE (stack_args[i]);
+ struct type *type = value_type (stack_args[i]);
char *valbuf = VALUE_CONTENTS (stack_args[i]);
int len = TYPE_LENGTH (type);
int len;
struct type *arg_type;
- arg_type = check_typedef (VALUE_TYPE (args[argnum]));
+ arg_type = check_typedef (value_type (args[argnum]));
len = TYPE_LENGTH (arg_type);
/* ANSI C code passes float arguments as integers, K&R code
enum type_code typecode;
struct type *arg_type, *target_type;
- arg_type = check_typedef (VALUE_TYPE (args[argnum]));
+ arg_type = check_typedef (value_type (args[argnum]));
target_type = TYPE_TARGET_TYPE (arg_type);
len = TYPE_LENGTH (arg_type);
typecode = TYPE_CODE (arg_type);
int last_regnum;
int j;
struct value *arg = args[i];
- struct type *type = check_typedef (VALUE_TYPE (arg));
+ struct type *type = check_typedef (value_type (arg));
char *contents = VALUE_CONTENTS (arg);
int len = TYPE_LENGTH (type);
int reg_demand;
int i;
- len = TYPE_LENGTH (VALUE_TYPE (args[argnum]));
+ len = TYPE_LENGTH (value_type (args[argnum]));
val = (char *) VALUE_CONTENTS (args[argnum]);
/* How may registers worth of storage do we need for this argument? */
stack_space = 0;
for (argnum = 0; argnum < nargs; ++argnum)
- stack_space += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 4);
+ stack_space += align_up (TYPE_LENGTH (value_type (args[argnum])), 4);
stack_space -= (6 * 4);
if (stack_space > 0)
for (argnum = 0; argnum < nargs; ++argnum)
{
arg = args[argnum];
- arg_type = check_typedef (VALUE_TYPE (arg));
+ arg_type = check_typedef (value_type (arg));
len = TYPE_LENGTH (arg_type);
typecode = TYPE_CODE (arg_type);
/* Now make sure there's space on the stack for the arguments. We
may over-allocate a little here, but that won't hurt anything. */
for (argument = 0; argument < nargs; argument++)
- stack_alloc += align_up (TYPE_LENGTH (VALUE_TYPE (args[argument])),
+ stack_alloc += align_up (TYPE_LENGTH (value_type (args[argument])),
wordsize);
sp -= stack_alloc;
for (argument = 0; argument < nargs; argument++)
{
- struct type *type = VALUE_TYPE (args[argument]);
+ struct type *type = value_type (args[argument]);
int len = TYPE_LENGTH (type);
char *contents = (char *) VALUE_CONTENTS (args[argument]);
for (i = 0; i < nargs; i++)
{
struct value *arg = args[i];
- struct type *type = check_typedef (VALUE_TYPE (arg));
+ struct type *type = check_typedef (value_type (arg));
/* The corresponding parameter that is pushed onto the
stack, and [possibly] passed in a register. */
char param_val[8];
for (i = 0; i < nargs; i++)
{
struct value *arg = args[i];
- struct type *type = check_typedef (VALUE_TYPE (arg));
+ struct type *type = check_typedef (value_type (arg));
if ((TYPE_CODE (type) == TYPE_CODE_INT
|| TYPE_CODE (type) == TYPE_CODE_ENUM)
&& TYPE_LENGTH (type) <= 8)
for (argno = 0; argno < nargs; argno++)
{
arg = args[argno];
- type = check_typedef (VALUE_TYPE (arg));
+ type = check_typedef (value_type (arg));
len = TYPE_LENGTH (type);
if ((nslots & 1) && slot_alignment_is_next_even (type))
struct type *float_elt_type;
arg = args[argno];
- type = check_typedef (VALUE_TYPE (arg));
+ type = check_typedef (value_type (arg));
len = TYPE_LENGTH (type);
/* Special handling for function parameters. */
/* Now make sure there's space on the stack */
for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
+ stack_alloc += ((TYPE_LENGTH (value_type (args[argnum])) + 3) & ~3);
sp -= stack_alloc; /* make room on stack for args */
for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
{
- type = VALUE_TYPE (args[argnum]);
+ type = value_type (args[argnum]);
typecode = TYPE_CODE (type);
len = TYPE_LENGTH (type);
}
else if (nargs > 0)
{
- type = VALUE_TYPE (args[0]);
+ type = value_type (args[0]);
len = TYPE_LENGTH (type);
/* First argument is passed in D and X registers. */
for (argnum = nargs - 1; argnum >= first_stack_argnum; argnum--)
{
- type = VALUE_TYPE (args[argnum]);
+ type = value_type (args[argnum]);
len = TYPE_LENGTH (type);
if (len & 1)
for (i = 0; i < nargs; i++)
{
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
if (m88k_integral_or_pointer_p (type) && len < 4)
{
args[i] = value_cast (builtin_type_int32, args[i]);
- type = VALUE_TYPE (args[i]);
+ type = value_type (args[i]);
len = TYPE_LENGTH (type);
}
for (i = 0; i < nargs; i++)
{
char *valbuf = VALUE_CONTENTS (args[i]);
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
int stack_word = num_stack_words;
for (argnum = 0; argnum < nargs; argnum++)
{
char *val = (char *) VALUE_CONTENTS (args[argnum]);
- int len = TYPE_LENGTH (VALUE_TYPE (args[argnum]));
- struct type *type = VALUE_TYPE (args[argnum]);
+ int len = TYPE_LENGTH (value_type (args[argnum]));
+ struct type *type = value_type (args[argnum]);
int olen;
mcore_insn_debug (("MCORE PUSH: argreg=%d; len=%d; %s\n",
/* Any remainder for the stack is noted below... */
}
- else if (TYPE_CODE (VALUE_TYPE (args[argnum])) != TYPE_CODE_STRUCT
+ else if (TYPE_CODE (value_type (args[argnum])) != TYPE_CODE_STRUCT
&& len > DEPRECATED_REGISTER_SIZE)
{
/* All subsequent args go onto the stack. */
than necessary for EABI, because the first few arguments are
passed in registers, but that's OK. */
for (argnum = 0; argnum < nargs; argnum++)
- len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (value_type (args[argnum])),
mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
char *val;
char valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
- struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+ struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
enum type_code typecode = TYPE_CODE (arg_type);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (value_type (args[argnum])),
mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
{
char *val;
struct value *arg = args[argnum];
- struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+ struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
enum type_code typecode = TYPE_CODE (arg_type);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (value_type (args[argnum])),
mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
{
char *val;
struct value *arg = args[argnum];
- struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+ struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
enum type_code typecode = TYPE_CODE (arg_type);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (value_type (args[argnum])),
mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
{
char *val;
struct value *arg = args[argnum];
- struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+ struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
enum type_code typecode = TYPE_CODE (arg_type);
static LONGEST
extend_simple_arg (struct value *arg)
{
- struct type *type = VALUE_TYPE (arg);
+ struct type *type = value_type (arg);
/* Even structs get passed in the least significant bits of the
register / memory word. It's not really right to extract them as
for (i = 0; i < nargs; i++)
{
struct value *arg = args[i];
- struct type *type = VALUE_TYPE (arg);
+ struct type *type = value_type (arg);
unsigned length = TYPE_LENGTH (type);
if (s390_function_arg_pass_by_reference (type))
for (i = 0; i < nargs; i++)
{
struct value *arg = args[i];
- struct type *type = VALUE_TYPE (arg);
+ struct type *type = value_type (arg);
unsigned length = TYPE_LENGTH (type);
if (s390_function_arg_pass_by_reference (type))
{
int stack_alloc = 0;
while (nargs-- > 0)
- stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[nargs])) + 3) & ~3);
+ stack_alloc += ((TYPE_LENGTH (value_type (args[nargs])) + 3) & ~3);
return stack_alloc;
}
in four registers available. Loop thru args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
- type = VALUE_TYPE (args[argnum]);
+ type = value_type (args[argnum]);
len = TYPE_LENGTH (type);
val = sh_justify_value_in_reg (args[argnum], len);
in four registers available. Loop thru args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
- type = VALUE_TYPE (args[argnum]);
+ type = value_type (args[argnum]);
len = TYPE_LENGTH (type);
val = sh_justify_value_in_reg (args[argnum], len);
/* Now make sure there's space on the stack */
for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 7) & ~7);
+ stack_alloc += ((TYPE_LENGTH (value_type (args[argnum])) + 7) & ~7);
sp -= stack_alloc; /* make room on stack for args */
/* Now load as many as possible of the first arguments into
for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
{
- type = VALUE_TYPE (args[argnum]);
+ type = value_type (args[argnum]);
len = TYPE_LENGTH (type);
memset (valbuf, 0, sizeof (valbuf));
for (i = 0; i < nargs; i++)
{
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
if (sparc_structure_or_union_p (type)
for (i = 0; i < nargs; i++)
{
char *valbuf = VALUE_CONTENTS (args[i]);
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
gdb_assert (len == 4 || len == 8);
for (i = 0; i < nargs; i++)
{
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
if (sparc64_structure_or_union_p (type))
for (i = 0; i < nargs; i++)
{
char *valbuf = VALUE_CONTENTS (args[i]);
- struct type *type = VALUE_TYPE (args[i]);
+ struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
int regnum = -1;
char buf[16];
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
+ len += ((TYPE_LENGTH (value_type (args[argnum])) + 3) & ~3);
sp -= len + stack_offset; /* possibly over-allocating, but it works... */
/* (you might think we could allocate 16 bytes */
/* less, but the ABI seems to use it all! ) */
char *val;
char valbuf[v850_register_raw_size (E_ARG0_REGNUM)];
- if (!v850_type_is_scalar (VALUE_TYPE (*args))
- && TYPE_LENGTH (VALUE_TYPE (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
+ if (!v850_type_is_scalar (value_type (*args))
+ && TYPE_LENGTH (value_type (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
{
store_unsigned_integer (valbuf, 4, VALUE_ADDRESS (*args));
len = 4;
}
else
{
- len = TYPE_LENGTH (VALUE_TYPE (*args));
+ len = TYPE_LENGTH (value_type (*args));
val = (char *) VALUE_CONTENTS (*args);
}