aboutsummaryrefslogtreecommitdiff
path: root/gdb/cris-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-05-05 17:56:57 +0000
committerAndrew Cagney <cagney@redhat.com>2003-05-05 17:56:57 +0000
commitb1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42 (patch)
tree4833fc30d54f0ce4fe0d97b777feacbbd0048cbe /gdb/cris-tdep.c
parent4e795f50c1c5f7e59a8ab1f127bc5267d81600f1 (diff)
downloadgdb-b1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42.zip
gdb-b1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42.tar.gz
gdb-b1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42.tar.bz2
2003-05-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_SIZE): Rename REGISTER_SIZE. (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS): Rename SIZEOF_CALL_DUMMY_WORDS. (DEPRECATED_CALL_DUMMY_WORDS): Rename CALL_DUMMY_WORDS. (DEPRECATED_FIX_CALL_DUMMY): Rename FIX_CALL_DUMMY. (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET): Rename CALL_DUMMY_BREAKPOINT_OFFSET. (DEPRECATED_CALL_DUMMY_START_OFFSET): Rename CALL_DUMMY_START_OFFSET. (DEPRECATED_CALL_DUMMY_LENGTH): Rename CALL_DUMMY_LENGTH. * gdbarch.h, gdbarch.c: Re-generate. * alpha-tdep.c, alphafbsd-tdep.c, arm-linux-tdep.c: Update. * arm-tdep.c, avr-tdep.c, breakpoint.c, cris-tdep.c: Update. * dummy-frame.c, dummy-frame.h, frv-tdep.c, gdbarch.c: Update. * gdbarch.h, gdbarch.sh, h8300-tdep.c, hppa-tdep.c: Update. * i386-tdep.c, ia64-tdep.c, infcall.c, inferior.h: Update. * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Update. * mips-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Update. * rs6000-tdep.c, s390-tdep.c, sh-tdep.c, sol-thread.c: Update. * sparc-tdep.c, target.c, v850-tdep.c, valops.c: Update. * vax-tdep.c, x86-64-tdep.c, xstormy16-tdep.c: Update. * config/ia64/tm-ia64.h, config/m68k/tm-vx68.h: Update. * config/mips/tm-mips.h, config/pa/nm-hppah.h: Update. * config/pa/tm-hppa.h, config/pa/tm-hppa64.h: Update. * config/s390/tm-s390.h, config/sparc/tm-sp64.h: Update. * config/sparc/tm-sparc.h: Update. Index: doc/ChangeLog 2003-05-03 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Make CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_LENGTH, FIX_CALL_DUMMY, CALL_DUMMY_BREAKPOINT_OFFSET and CALL_DUMMY_BREAKPOINT_OFFSET deprecated. Index: mi/ChangeLog 2003-05-03 Andrew Cagney <cagney@redhat.com> * mi-main.c (mi_cmd_data_write_register_values): Replace REGISTER_SIZE with DEPRECATED_REGISTER_SIZE. Index: testsuite/ChangeLog 2003-05-03 Andrew Cagney <cagney@redhat.com> * gdb.base/watchpoint.exp: Rename CALL_DUMMY_BREAKPOINT_OFFSET to DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET in comments.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r--gdb/cris-tdep.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index a963d21..ff2d6d2 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -971,7 +971,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
- if (len <= REGISTER_SIZE)
+ if (len <= DEPRECATED_REGISTER_SIZE)
deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large.");
@@ -984,7 +984,7 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
- if (len <= 2 * REGISTER_SIZE)
+ if (len <= 2 * DEPRECATED_REGISTER_SIZE)
{
/* Note that this works since R10 and R11 are consecutive registers. */
deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf,
@@ -1057,7 +1057,7 @@ cris_abi_original_extract_return_value (struct type *type, char *regbuf,
{
int len = TYPE_LENGTH (type);
- if (len <= REGISTER_SIZE)
+ if (len <= DEPRECATED_REGISTER_SIZE)
memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_extract_return_value: type length too large");
@@ -1071,7 +1071,7 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
{
int len = TYPE_LENGTH (type);
- if (len <= 2 * REGISTER_SIZE)
+ if (len <= 2 * DEPRECATED_REGISTER_SIZE)
memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len);
else
internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large");
@@ -1311,13 +1311,13 @@ cris_abi_original_push_arguments (int nargs, struct value **args,
/* Make sure there's space on the stack. Allocate space for data and a
parameter to refer to that data. */
for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + REGISTER_SIZE);
+ stack_alloc += (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + DEPRECATED_REGISTER_SIZE);
sp -= stack_alloc;
/* We may over-allocate a little here, but that won't hurt anything. */
/* Initialize stack frame pointers. */
fp_params = sp;
- fp_data = sp + (nargs * REGISTER_SIZE);
+ fp_data = sp + (nargs * DEPRECATED_REGISTER_SIZE);
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. */
@@ -1330,14 +1330,14 @@ cris_abi_original_push_arguments (int nargs, struct value **args,
len = TYPE_LENGTH (type);
val = (char *) VALUE_CONTENTS (args[argnum]);
- if (len <= REGISTER_SIZE && argreg <= ARG4_REGNUM)
+ if (len <= DEPRECATED_REGISTER_SIZE && argreg <= ARG4_REGNUM)
{
/* Data fits in a register; put it in the first available
register. */
write_register (argreg, *(unsigned long *) val);
argreg++;
}
- else if (len > REGISTER_SIZE && argreg <= ARG4_REGNUM)
+ else if (len > DEPRECATED_REGISTER_SIZE && argreg <= ARG4_REGNUM)
{
/* Data does not fit in register; pass it on the stack and
put its address in the first available register. */
@@ -1346,21 +1346,21 @@ cris_abi_original_push_arguments (int nargs, struct value **args,
fp_data += len;
argreg++;
}
- else if (len > REGISTER_SIZE)
+ else if (len > DEPRECATED_REGISTER_SIZE)
{
/* Data does not fit in register; put both data and
parameter on the stack. */
write_memory (fp_data, val, len);
- write_memory (fp_params, (char *) (&fp_data), REGISTER_SIZE);
+ write_memory (fp_params, (char *) (&fp_data), DEPRECATED_REGISTER_SIZE);
fp_data += len;
- fp_params += REGISTER_SIZE;
+ fp_params += DEPRECATED_REGISTER_SIZE;
}
else
{
/* Data fits in a register, but we are out of registers;
put the parameter on the stack. */
- write_memory (fp_params, val, REGISTER_SIZE);
- fp_params += REGISTER_SIZE;
+ write_memory (fp_params, val, DEPRECATED_REGISTER_SIZE);
+ fp_params += DEPRECATED_REGISTER_SIZE;
}
}
@@ -1401,20 +1401,21 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int reg_demand;
len = TYPE_LENGTH (VALUE_TYPE (args[argnum]));
- reg_demand = (len / REGISTER_SIZE) + (len % REGISTER_SIZE != 0 ? 1 : 0);
+ reg_demand = (len / DEPRECATED_REGISTER_SIZE) + (len % DEPRECATED_REGISTER_SIZE != 0 ? 1 : 0);
- /* reg_demand * REGISTER_SIZE is the amount of memory we might need to
- allocate for this argument. 2 * REGISTER_SIZE is the amount of stack
- space we might need to pass the argument itself (either by value or by
+ /* reg_demand * DEPRECATED_REGISTER_SIZE is the amount of memory
+ we might need to allocate for this argument. 2 *
+ DEPRECATED_REGISTER_SIZE is the amount of stack space we
+ might need to pass the argument itself (either by value or by
reference). */
- stack_alloc += (reg_demand * REGISTER_SIZE + 2 * REGISTER_SIZE);
+ stack_alloc += (reg_demand * DEPRECATED_REGISTER_SIZE + 2 * DEPRECATED_REGISTER_SIZE);
}
sp -= stack_alloc;
/* We may over-allocate a little here, but that won't hurt anything. */
/* Initialize frame pointers. */
fp_arg = sp;
- fp_mem = sp + (nargs * (2 * REGISTER_SIZE));
+ fp_mem = sp + (nargs * (2 * DEPRECATED_REGISTER_SIZE));
/* Now load as many as possible of the first arguments into registers,
and push the rest onto the stack. */
@@ -1432,9 +1433,9 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
val = (char *) VALUE_CONTENTS (args[argnum]);
/* How may registers worth of storage do we need for this argument? */
- reg_demand = (len / REGISTER_SIZE) + (len % REGISTER_SIZE != 0 ? 1 : 0);
+ reg_demand = (len / DEPRECATED_REGISTER_SIZE) + (len % DEPRECATED_REGISTER_SIZE != 0 ? 1 : 0);
- if (len <= (2 * REGISTER_SIZE)
+ if (len <= (2 * DEPRECATED_REGISTER_SIZE)
&& (argreg + reg_demand - 1 <= ARG4_REGNUM))
{
/* Data passed by value. Fits in available register(s). */
@@ -1442,10 +1443,10 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
write_register (argreg, *(unsigned long *) val);
argreg++;
- val += REGISTER_SIZE;
+ val += DEPRECATED_REGISTER_SIZE;
}
}
- else if (len <= (2 * REGISTER_SIZE) && argreg <= ARG4_REGNUM)
+ else if (len <= (2 * DEPRECATED_REGISTER_SIZE) && argreg <= ARG4_REGNUM)
{
/* Data passed by value. Does not fit in available register(s).
Use the register(s) first, then the stack. */
@@ -1455,28 +1456,29 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
write_register (argreg, *(unsigned long *) val);
argreg++;
- val += REGISTER_SIZE;
+ val += DEPRECATED_REGISTER_SIZE;
}
else
{
- /* I guess this memory write could write the remaining data
- all at once instead of in REGISTER_SIZE chunks. */
- write_memory (fp_arg, val, REGISTER_SIZE);
- fp_arg += REGISTER_SIZE;
- val += REGISTER_SIZE;
+ /* I guess this memory write could write the
+ remaining data all at once instead of in
+ DEPRECATED_REGISTER_SIZE chunks. */
+ write_memory (fp_arg, val, DEPRECATED_REGISTER_SIZE);
+ fp_arg += DEPRECATED_REGISTER_SIZE;
+ val += DEPRECATED_REGISTER_SIZE;
}
}
}
- else if (len > (2 * REGISTER_SIZE))
+ else if (len > (2 * DEPRECATED_REGISTER_SIZE))
{
/* Data passed by reference. Put it on the stack. */
write_memory (fp_mem, val, len);
- write_memory (fp_arg, (char *) (&fp_mem), REGISTER_SIZE);
+ write_memory (fp_arg, (char *) (&fp_mem), DEPRECATED_REGISTER_SIZE);
/* fp_mem need not be word-aligned since it's just a chunk of
memory being pointed at. That is, += len would do. */
- fp_mem += reg_demand * REGISTER_SIZE;
- fp_arg += REGISTER_SIZE;
+ fp_mem += reg_demand * DEPRECATED_REGISTER_SIZE;
+ fp_arg += DEPRECATED_REGISTER_SIZE;
}
else
{
@@ -1486,7 +1488,7 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* fp_arg must be word-aligned (i.e., don't += len) to match
the function prologue. */
- fp_arg += reg_demand * REGISTER_SIZE;
+ fp_arg += reg_demand * DEPRECATED_REGISTER_SIZE;
}
}
@@ -4189,7 +4191,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Length of ordinary registers used in push_word and a few other places.
REGISTER_RAW_SIZE is the real way to know how big a register is. */
- set_gdbarch_register_size (gdbarch, 4);
+ set_gdbarch_deprecated_register_size (gdbarch, 4);
/* NEW */
set_gdbarch_register_bytes_ok (gdbarch, cris_register_bytes_ok);
@@ -4260,8 +4262,8 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Defined to 1 to indicate that the target supports inferior function
calls. */
- set_gdbarch_call_dummy_words (gdbarch, 0);
- set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_deprecated_call_dummy_words (gdbarch, 0);
+ set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);