* arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define.

(ARM_MAX_REGISTER_VIRTUAL_SIZE): Define.
* arm-tdep.c (arm_store_return_value): Use them.
Use FP_REGISTER_RAW_SIZE when setting the FPA return value.
* remote-rdp.c (remote_rdp_fetch_register): Use
ARM_MAX_REGISTER_RAW_SIZE.
(remote_rdp_store_register): Likewise.
This commit is contained in:
Richard Earnshaw 2002-05-07 12:58:51 +00:00
parent 4657573b80
commit 7bbcf28307
4 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,13 @@
2002-05-07 Richard Earnshaw <rearnsha@arm.com>
* arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define.
(ARM_MAX_REGISTER_VIRTUAL_SIZE): Define.
* arm-tdep.c (arm_store_return_value): Use them.
Use FP_REGISTER_RAW_SIZE when setting the FPA return value.
* remote-rdp.c (remote_rdp_fetch_register): Use
ARM_MAX_REGISTER_RAW_SIZE.
(remote_rdp_store_register): Likewise.
2002-05-07 Michal Ludvig <mludvig@suse.cz> 2002-05-07 Michal Ludvig <mludvig@suse.cz>
* dwarf2cfi.c: Code cleanup, removed unused variables, * dwarf2cfi.c: Code cleanup, removed unused variables,

View file

@ -2336,7 +2336,7 @@ arm_store_return_value (struct type *type, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT) if (TYPE_CODE (type) == TYPE_CODE_FLT)
{ {
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
char buf[MAX_REGISTER_RAW_SIZE]; char buf[ARM_MAX_REGISTER_RAW_SIZE];
switch (tdep->fp_model) switch (tdep->fp_model)
{ {
@ -2344,7 +2344,7 @@ arm_store_return_value (struct type *type, char *valbuf)
convert_to_extended (valbuf, buf); convert_to_extended (valbuf, buf);
write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf, write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf,
MAX_REGISTER_RAW_SIZE); FP_REGISTER_RAW_SIZE);
break; break;
case ARM_FLOAT_SOFT: case ARM_FLOAT_SOFT:

View file

@ -45,6 +45,10 @@ enum gdb_regnum {
ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM
}; };
/* Used in target-specific code when we need to know the size of the
largest type of register we need to handle. */
#define ARM_MAX_REGISTER_RAW_SIZE 12
#define ARM_MAX_REGISTER_VIRTUAL_SIZE 8
/* Size of integer registers. */ /* Size of integer registers. */
#define INT_REGISTER_RAW_SIZE 4 #define INT_REGISTER_RAW_SIZE 4

View file

@ -612,7 +612,7 @@ remote_rdp_fetch_register (int regno)
} }
else else
{ {
char buf[MAX_REGISTER_RAW_SIZE]; char buf[ARM_MAX_REGISTER_RAW_SIZE];
if (regno < 15) if (regno < 15)
rdp_fetch_one_register (1 << regno, buf); rdp_fetch_one_register (1 << regno, buf);
else if (regno == ARM_PC_REGNUM) else if (regno == ARM_PC_REGNUM)
@ -642,7 +642,7 @@ remote_rdp_store_register (int regno)
} }
else else
{ {
char tmp[MAX_REGISTER_RAW_SIZE]; char tmp[ARM_MAX_REGISTER_RAW_SIZE];
read_register_gen (regno, tmp); read_register_gen (regno, tmp);
if (regno < 15) if (regno < 15)
rdp_store_one_register (1 << regno, tmp); rdp_store_one_register (1 << regno, tmp);