2003-09-17 Andrew Cagney <cagney@redhat.com>

* gdbarch.sh (DEPRECATED_REGISTER_BYTE): Rename REGISTER_BYTE.
	* gdbarch.h, gdbarch.c: Regenerate.
	* arm-linux-tdep.c, core-sol2.c, cris-tdep.c: Update.
	* d10v-tdep.c, frame.c: Update.
	* hppa-tdep.c, hppab-nat.c, hppah-nat.c, hppam3-nat.c: Update.
	* hpux-thread.c, i386gnu-nat.c, ia64-aix-nat.c: Update.
	* ia64-linux-nat.c, irix5-nat.c, lynx-nat.c, m68knbsd-nat.c: Update.
	* mcore-tdep.c, mips-linux-tdep.c, mips-tdep.c: Update.
	* mipsv4-nat.c, mn10300-tdep.c, ns32k-tdep.c: Update.
	* ns32knbsd-nat.c, ppc-bdm.c, regcache.c, remote-sds.c: Update.
	* remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Update.
	* remote.c, rs6000-tdep.c, s390-tdep.c, sh64-tdep.c: Update.
	* sparc-nat.c, sparc-tdep.c, sun3-nat.c, v850-tdep.c: Update.
	* v850ice.c, vax-tdep.c, xstormy16-tdep.c: Update.
	* config/m68k/tm-cisco.h, config/m68k/tm-delta68.h: Update.
	* config/pa/nm-hppah.h: Update.

2003-09-17  Andrew Cagney  <cagney@redhat.com>

	* mi/mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
This commit is contained in:
Andrew Cagney 2003-09-17 14:24:31 +00:00
parent 8cd5b11339
commit 627003499d
49 changed files with 364 additions and 336 deletions

View File

@ -1,3 +1,22 @@
2003-09-17 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_BYTE): Rename REGISTER_BYTE.
* gdbarch.h, gdbarch.c: Regenerate.
* arm-linux-tdep.c, core-sol2.c, cris-tdep.c: Update.
* d10v-tdep.c, frame.c: Update.
* hppa-tdep.c, hppab-nat.c, hppah-nat.c, hppam3-nat.c: Update.
* hpux-thread.c, i386gnu-nat.c, ia64-aix-nat.c: Update.
* ia64-linux-nat.c, irix5-nat.c, lynx-nat.c, m68knbsd-nat.c: Update.
* mcore-tdep.c, mips-linux-tdep.c, mips-tdep.c: Update.
* mipsv4-nat.c, mn10300-tdep.c, ns32k-tdep.c: Update.
* ns32knbsd-nat.c, ppc-bdm.c, regcache.c, remote-sds.c: Update.
* remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Update.
* remote.c, rs6000-tdep.c, s390-tdep.c, sh64-tdep.c: Update.
* sparc-nat.c, sparc-tdep.c, sun3-nat.c, v850-tdep.c: Update.
* v850ice.c, vax-tdep.c, xstormy16-tdep.c: Update.
* config/m68k/tm-cisco.h, config/m68k/tm-delta68.h: Update.
* config/pa/nm-hppah.h: Update.
2003-09-16 Andrew Cagney <cagney@redhat.com> 2003-09-16 Andrew Cagney <cagney@redhat.com>
* ppc-linux-tdep.c (ppc_linux_init_abi): Set the 32 bit * ppc-linux-tdep.c (ppc_linux_init_abi): Set the 32 bit

View File

@ -86,7 +86,7 @@ arm_linux_extract_return_value (struct type *type,
int regnum = ((TYPE_CODE_FLT == TYPE_CODE (type)) int regnum = ((TYPE_CODE_FLT == TYPE_CODE (type))
? ARM_F0_REGNUM : ARM_A1_REGNUM); ? ARM_F0_REGNUM : ARM_A1_REGNUM);
memcpy (valbuf, &regbuf[REGISTER_BYTE (regnum)], TYPE_LENGTH (type)); memcpy (valbuf, &regbuf[DEPRECATED_REGISTER_BYTE (regnum)], TYPE_LENGTH (type));
} }
/* Note: ScottB /* Note: ScottB

View File

@ -51,5 +51,5 @@
/* BFD handles finding the registers in the core file, so they are at /* BFD handles finding the registers in the core file, so they are at
the start of the BFD .reg section. */ the start of the BFD .reg section. */
#define REGISTER_U_ADDR(addr,blockend,regno) (addr = REGISTER_BYTE (regno)) #define REGISTER_U_ADDR(addr,blockend,regno) (addr = DEPRECATED_REGISTER_BYTE (regno))
#define KERNEL_U_ADDR 0 #define KERNEL_U_ADDR 0

View File

@ -50,7 +50,7 @@ struct frame_info;
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
&REGBUF[REGISTER_BYTE (FP0_REGNUM)], \ &REGBUF[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \ VALBUF); \
else \ else \
memcpy ((VALBUF), \ memcpy ((VALBUF), \
@ -70,7 +70,7 @@ struct frame_info;
{ \ { \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \ char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \ DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \ raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \ } \
else \ else \

View File

@ -25,7 +25,7 @@
/* What a coincidence! */ /* What a coincidence! */
#define REGISTER_U_ADDR(addr, blockend, regno) \ #define REGISTER_U_ADDR(addr, blockend, regno) \
{ addr = (int)(blockend) + REGISTER_BYTE (regno);} { addr = (int)(blockend) + DEPRECATED_REGISTER_BYTE (regno);}
/* This isn't really correct, because ptrace is actually a 32-bit /* This isn't really correct, because ptrace is actually a 32-bit
interface. However, the modern HP-UX targets all really use interface. However, the modern HP-UX targets all really use

View File

@ -94,18 +94,18 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct regs *gregs = (struct regs *) core_reg_sect; struct regs *gregs = (struct regs *) core_reg_sect;
/* G0 *always* holds 0. */ /* G0 *always* holds 0. */
*(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */ /* The globals and output registers. */
memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
&gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM)); &gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)]
= gregs->r_ps; = gregs->r_ps;
*(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
= gregs->r_pc; = gregs->r_pc;
*(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)]
= gregs->r_npc; = gregs->r_npc;
*(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)]
= gregs->r_y; = gregs->r_y;
/* My best guess at where to get the locals and input /* My best guess at where to get the locals and input
@ -116,9 +116,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{ {
int sp; int sp;
sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)]; sp = *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp, if (0 != target_read_memory (sp,
&deprecated_registers[REGISTER_BYTE (L0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM))) 16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{ {
warning ("couldn't read input and local registers from core file\n"); warning ("couldn't read input and local registers from core file\n");
@ -167,9 +167,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{ {
struct fpu *fpuregs = (struct fpu *) core_reg_sect; struct fpu *fpuregs = (struct fpu *) core_reg_sect;
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&fpuregs->fpu_fr, sizeof (fpuregs->fpu_fr)); &fpuregs->fpu_fr, sizeof (fpuregs->fpu_fr));
memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
&fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE)); &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
} }
else else

View File

@ -972,7 +972,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
int len = TYPE_LENGTH (type); int len = TYPE_LENGTH (type);
if (len <= DEPRECATED_REGISTER_SIZE) if (len <= DEPRECATED_REGISTER_SIZE)
deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len); deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (RET_REGNUM), valbuf, len);
else else
internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large."); internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large.");
} }
@ -987,8 +987,8 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
if (len <= 2 * DEPRECATED_REGISTER_SIZE) if (len <= 2 * DEPRECATED_REGISTER_SIZE)
{ {
/* Note that this works since R10 and R11 are consecutive registers. */ /* Note that this works since R10 and R11 are consecutive registers. */
deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (RET_REGNUM),
len); valbuf, len);
} }
else else
internal_error (__FILE__, __LINE__, "cris_abi_v2_store_return_value: type length too large."); internal_error (__FILE__, __LINE__, "cris_abi_v2_store_return_value: type length too large.");
@ -1058,7 +1058,7 @@ cris_abi_original_extract_return_value (struct type *type, char *regbuf,
int len = TYPE_LENGTH (type); int len = TYPE_LENGTH (type);
if (len <= DEPRECATED_REGISTER_SIZE) if (len <= DEPRECATED_REGISTER_SIZE)
memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (RET_REGNUM), len);
else else
internal_error (__FILE__, __LINE__, "cris_abi_original_extract_return_value: type length too large"); internal_error (__FILE__, __LINE__, "cris_abi_original_extract_return_value: type length too large");
} }
@ -1072,7 +1072,7 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
int len = TYPE_LENGTH (type); int len = TYPE_LENGTH (type);
if (len <= 2 * DEPRECATED_REGISTER_SIZE) if (len <= 2 * DEPRECATED_REGISTER_SIZE)
memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (RET_REGNUM), len);
else else
internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large"); internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large");
} }

View File

@ -277,9 +277,9 @@ d10v_ts3_imap_register (void *regcache, int reg_nr)
return reg; return reg;
} }
/* MAP GDB's internal register numbering (determined by the layout fo /* MAP GDB's internal register numbering (determined by the layout
the REGISTER_BYTE array) onto the simulator's register from the DEPRECATED_REGISTER_BYTE array) onto the simulator's
numbering. */ register numbering. */
static int static int
d10v_ts2_register_sim_regno (int nr) d10v_ts2_register_sim_regno (int nr)

View File

@ -1089,9 +1089,9 @@ const struct frame_unwind *legacy_saved_regs_unwind = &legacy_saved_regs_unwinde
calculated rather than fetched). We will use not_lval for values calculated rather than fetched). We will use not_lval for values
fetched from generic dummy frames. fetched from generic dummy frames.
Set *ADDRP to the address, either in memory or as a REGISTER_BYTE Set *ADDRP to the address, either in memory or as a
offset into the registers array. If the value is stored in a dummy DEPRECATED_REGISTER_BYTE offset into the registers array. If the
frame, set *ADDRP to zero. value is stored in a dummy frame, set *ADDRP to zero.
The argument RAW_BUFFER must point to aligned memory. */ The argument RAW_BUFFER must point to aligned memory. */
@ -1172,7 +1172,7 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
if (lval) /* found it in a live register */ if (lval) /* found it in a live register */
*lval = lval_register; *lval = lval_register;
if (addrp) if (addrp)
*addrp = REGISTER_BYTE (regnum); *addrp = DEPRECATED_REGISTER_BYTE (regnum);
if (raw_buffer) if (raw_buffer)
deprecated_read_register_gen (regnum, raw_buffer); deprecated_read_register_gen (regnum, raw_buffer);
} }

View File

@ -1452,6 +1452,25 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_push_return_address (long) current_gdbarch->deprecated_push_return_address
/*DEPRECATED_PUSH_RETURN_ADDRESS ()*/); /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
#endif #endif
#ifdef DEPRECATED_REGISTER_BYTE_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_REGISTER_BYTE_P()",
XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
DEPRECATED_REGISTER_BYTE_P ());
#endif
#ifdef DEPRECATED_REGISTER_BYTE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_REGISTER_BYTE(reg_nr)",
XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
(long) current_gdbarch->deprecated_register_byte
/*DEPRECATED_REGISTER_BYTE ()*/);
#endif
#ifdef DEPRECATED_REGISTER_BYTES #ifdef DEPRECATED_REGISTER_BYTES
fprintf_unfiltered (file, fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n", "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
@ -1996,25 +2015,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file, fprintf_unfiltered (file,
"gdbarch_dump: push_dummy_code = 0x%08lx\n", "gdbarch_dump: push_dummy_code = 0x%08lx\n",
(long) current_gdbarch->push_dummy_code); (long) current_gdbarch->push_dummy_code);
#ifdef REGISTER_BYTE_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_BYTE_P()",
XSTRING (REGISTER_BYTE_P ()));
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_BYTE_P() = %d\n",
REGISTER_BYTE_P ());
#endif
#ifdef REGISTER_BYTE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_BYTE(reg_nr)",
XSTRING (REGISTER_BYTE (reg_nr)));
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
(long) current_gdbarch->deprecated_register_byte
/*REGISTER_BYTE ()*/);
#endif
#ifdef REGISTER_BYTES_OK_P #ifdef REGISTER_BYTES_OK_P
fprintf_unfiltered (file, fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n", "gdbarch_dump: %s # %s\n",

View File

@ -508,29 +508,29 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
function works. This simplifies the migration process - old code, function works. This simplifies the migration process - old code,
calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */ calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
#if defined (REGISTER_BYTE) #if defined (DEPRECATED_REGISTER_BYTE)
/* Legacy for systems yet to multi-arch REGISTER_BYTE */ /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_BYTE */
#if !defined (REGISTER_BYTE_P) #if !defined (DEPRECATED_REGISTER_BYTE_P)
#define REGISTER_BYTE_P() (1) #define DEPRECATED_REGISTER_BYTE_P() (1)
#endif #endif
#endif #endif
extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch); extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE_P)
#error "Non multi-arch definition of REGISTER_BYTE" #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
#endif #endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_BYTE_P)
#define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch)) #define DEPRECATED_REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
#endif #endif
typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr); typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr); extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte); extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE) #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE)
#error "Non multi-arch definition of REGISTER_BYTE" #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
#endif #endif
#if !defined (REGISTER_BYTE) #if !defined (DEPRECATED_REGISTER_BYTE)
#define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr)) #define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif #endif
/* If all registers have identical raw and virtual sizes and those /* If all registers have identical raw and virtual sizes and those
@ -2036,7 +2036,7 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
#endif #endif
/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
ADDR_BITS_REMOVE. */ ADDR_BITS_REMOVE. */
typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
@ -2330,7 +2330,7 @@ typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int re
extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
/* Fetch the pointer to the ith function argument. */ /* Fetch the pointer to the ith function argument. */
#if defined (FETCH_POINTER_ARGUMENT) #if defined (FETCH_POINTER_ARGUMENT)
/* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */

View File

@ -481,7 +481,7 @@ v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
# consequence, even when the predicate is false, the corresponding # consequence, even when the predicate is false, the corresponding
# function works. This simplifies the migration process - old code, # function works. This simplifies the migration process - old code,
# calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. # calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified.
F::REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte F::DEPRECATED_REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
# If all registers have identical raw and virtual sizes and those # If all registers have identical raw and virtual sizes and those
# sizes agree with the value computed from REGISTER_TYPE, # sizes agree with the value computed from REGISTER_TYPE,
# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print # DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print

View File

@ -1633,7 +1633,7 @@ hppa_push_dummy_frame (void)
for (regnum = FP0_REGNUM; regnum < NUM_REGS; regnum++) for (regnum = FP0_REGNUM; regnum < NUM_REGS; regnum++)
{ {
deprecated_read_register_bytes (REGISTER_BYTE (regnum), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (regnum),
(char *) &freg_buffer, 8); (char *) &freg_buffer, 8);
sp = push_bytes (sp, (char *) &freg_buffer, 8); sp = push_bytes (sp, (char *) &freg_buffer, 8);
} }
@ -1714,7 +1714,7 @@ hppa_pop_frame (void)
if (fsr[regnum]) if (fsr[regnum])
{ {
read_memory (fsr[regnum], (char *) &freg_buffer, 8); read_memory (fsr[regnum], (char *) &freg_buffer, 8);
deprecated_write_register_bytes (REGISTER_BYTE (regnum), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum),
(char *) &freg_buffer, 8); (char *) &freg_buffer, 8);
} }
@ -2679,7 +2679,8 @@ pa_do_registers_info (int regnum, int fpregs)
/* Make a copy of gdb's save area (may cause actual /* Make a copy of gdb's save area (may cause actual
reads from the target). */ reads from the target). */
for (i = 0; i < NUM_REGS; i++) for (i = 0; i < NUM_REGS; i++)
frame_register_read (deprecated_selected_frame, i, raw_regs + REGISTER_BYTE (i)); frame_register_read (deprecated_selected_frame, i,
raw_regs + DEPRECATED_REGISTER_BYTE (i));
if (regnum == -1) if (regnum == -1)
pa_print_registers (raw_regs, regnum, fpregs); pa_print_registers (raw_regs, regnum, fpregs);
@ -2723,7 +2724,8 @@ pa_do_strcat_registers_info (int regnum, int fpregs, struct ui_file *stream,
/* Make a copy of gdb's save area (may cause actual /* Make a copy of gdb's save area (may cause actual
reads from the target). */ reads from the target). */
for (i = 0; i < NUM_REGS; i++) for (i = 0; i < NUM_REGS; i++)
frame_register_read (deprecated_selected_frame, i, raw_regs + REGISTER_BYTE (i)); frame_register_read (deprecated_selected_frame, i,
raw_regs + DEPRECATED_REGISTER_BYTE (i));
if (regnum == -1) if (regnum == -1)
pa_strcat_registers (raw_regs, regnum, fpregs, stream); pa_strcat_registers (raw_regs, regnum, fpregs, stream);
@ -2792,7 +2794,7 @@ pa_register_look_aside (char *raw_regs, int regnum, long *raw_val)
if (!is_pa_2) if (!is_pa_2)
{ {
raw_val[1] = *(long *) (raw_regs + REGISTER_BYTE (regnum)); raw_val[1] = *(long *) (raw_regs + DEPRECATED_REGISTER_BYTE (regnum));
return; return;
} }
@ -4816,13 +4818,13 @@ hppa32_store_return_value (struct type *type, char *valbuf)
If its a float value, then we also store it into the floating If its a float value, then we also store it into the floating
point registers. */ point registers. */
deprecated_write_register_bytes (REGISTER_BYTE (28) deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (28)
+ (TYPE_LENGTH (type) > 4 + (TYPE_LENGTH (type) > 4
? (8 - TYPE_LENGTH (type)) ? (8 - TYPE_LENGTH (type))
: (4 - TYPE_LENGTH (type))), : (4 - TYPE_LENGTH (type))),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
if (TYPE_CODE (type) == TYPE_CODE_FLT) if (TYPE_CODE (type) == TYPE_CODE_FLT)
deprecated_write_register_bytes (REGISTER_BYTE (FP4_REGNUM), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP4_REGNUM),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
} }
@ -4833,22 +4835,22 @@ hppa64_store_return_value (struct type *type, char *valbuf)
{ {
if (TYPE_CODE (type) == TYPE_CODE_FLT) if (TYPE_CODE (type) == TYPE_CODE_FLT)
deprecated_write_register_bytes deprecated_write_register_bytes
(REGISTER_BYTE (FP4_REGNUM) (DEPRECATED_REGISTER_BYTE (FP4_REGNUM)
+ DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type), + DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
else if (is_integral_type(type)) else if (is_integral_type(type))
deprecated_write_register_bytes deprecated_write_register_bytes
(REGISTER_BYTE (28) (DEPRECATED_REGISTER_BYTE (28)
+ DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type), + DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
else if (TYPE_LENGTH (type) <= 8) else if (TYPE_LENGTH (type) <= 8)
deprecated_write_register_bytes deprecated_write_register_bytes
(REGISTER_BYTE (28),valbuf, TYPE_LENGTH (type)); (DEPRECATED_REGISTER_BYTE (28),valbuf, TYPE_LENGTH (type));
else if (TYPE_LENGTH (type) <= 16) else if (TYPE_LENGTH (type) <= 16)
{ {
deprecated_write_register_bytes (REGISTER_BYTE (28),valbuf, 8); deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (28),valbuf, 8);
deprecated_write_register_bytes deprecated_write_register_bytes
(REGISTER_BYTE (29), valbuf + 8, TYPE_LENGTH (type) - 8); (DEPRECATED_REGISTER_BYTE (29), valbuf + 8, TYPE_LENGTH (type) - 8);
} }
} }
@ -4863,11 +4865,11 @@ void
hppa32_extract_return_value (struct type *type, char *regbuf, char *valbuf) hppa32_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{ {
if (TYPE_CODE (type) == TYPE_CODE_FLT) if (TYPE_CODE (type) == TYPE_CODE_FLT)
memcpy (valbuf, regbuf + REGISTER_BYTE (FP4_REGNUM), TYPE_LENGTH (type)); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (FP4_REGNUM), TYPE_LENGTH (type));
else else
memcpy (valbuf, memcpy (valbuf,
(regbuf (regbuf
+ REGISTER_BYTE (28) + DEPRECATED_REGISTER_BYTE (28)
+ (TYPE_LENGTH (type) > 4 + (TYPE_LENGTH (type) > 4
? (8 - TYPE_LENGTH (type)) ? (8 - TYPE_LENGTH (type))
: (4 - TYPE_LENGTH (type)))), : (4 - TYPE_LENGTH (type)))),
@ -4885,20 +4887,22 @@ hppa64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
Aggregates upto 128 bits are in r28 and r29, right padded. */ Aggregates upto 128 bits are in r28 and r29, right padded. */
if (TYPE_CODE (type) == TYPE_CODE_FLT) if (TYPE_CODE (type) == TYPE_CODE_FLT)
memcpy (valbuf, memcpy (valbuf,
regbuf + REGISTER_BYTE (FP4_REGNUM) regbuf + DEPRECATED_REGISTER_BYTE (FP4_REGNUM)
+ DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type), + DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type),
TYPE_LENGTH (type)); TYPE_LENGTH (type));
else if (is_integral_type(type)) else if (is_integral_type(type))
memcpy (valbuf, memcpy (valbuf,
regbuf + REGISTER_BYTE (28) regbuf + DEPRECATED_REGISTER_BYTE (28)
+ DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type), + DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (type),
TYPE_LENGTH (type)); TYPE_LENGTH (type));
else if (TYPE_LENGTH (type) <= 8) else if (TYPE_LENGTH (type) <= 8)
memcpy (valbuf, regbuf + REGISTER_BYTE (28), TYPE_LENGTH (type)); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (28),
TYPE_LENGTH (type));
else if (TYPE_LENGTH (type) <= 16) else if (TYPE_LENGTH (type) <= 16)
{ {
memcpy (valbuf, regbuf + REGISTER_BYTE (28), 8); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (28), 8);
memcpy (valbuf + 8, regbuf + REGISTER_BYTE (29), TYPE_LENGTH (type) - 8); memcpy (valbuf + 8, regbuf + DEPRECATED_REGISTER_BYTE (29),
TYPE_LENGTH (type) - 8);
} }
} }
@ -5036,7 +5040,7 @@ hppa_extract_struct_value_address (char *regbuf)
the address size is equal to the size of an int* _on the host_... the address size is equal to the size of an int* _on the host_...
One possible implementation that crossed my mind is to use One possible implementation that crossed my mind is to use
extract_address. */ extract_address. */
return (*(int *)(regbuf + REGISTER_BYTE (28))); return (*(int *)(regbuf + DEPRECATED_REGISTER_BYTE (28)));
} }
/* Return True if REGNUM is not a register available to the user /* Return True if REGNUM is not a register available to the user

View File

@ -118,7 +118,7 @@ store_inferior_registers (int regno)
errno = 0; errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM) if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
{ {
scratch = *(int *) &deprecated_registers[REGISTER_BYTE (regno)] | 0x3; scratch = *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)] | 0x3;
ptrace (PT_WUREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, ptrace (PT_WUREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
scratch); scratch);
if (errno != 0) if (errno != 0)
@ -135,7 +135,7 @@ store_inferior_registers (int regno)
errno = 0; errno = 0;
ptrace (PT_WUREGS, PIDGET (inferior_ptid), ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) regaddr, (PTRACE_ARG3_TYPE) regaddr,
*(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]); *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno) + i]);
if (errno != 0) if (errno != 0)
{ {
/* Warning, not error, in case we are attached; sometimes the /* Warning, not error, in case we are attached; sometimes the

View File

@ -98,7 +98,7 @@ store_inferior_registers (int regno)
/* Floating-point registers come from the ss_fpblock area. */ /* Floating-point registers come from the ss_fpblock area. */
else if (regno >= FP0_REGNUM) else if (regno >= FP0_REGNUM)
addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock) addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (FP0_REGNUM))); + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (FP0_REGNUM)));
/* Wide registers come from the ss_wide area. /* Wide registers come from the ss_wide area.
I think it's more PC to test (ss_flags & SS_WIDEREGS) to select I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
@ -107,13 +107,13 @@ store_inferior_registers (int regno)
every register reference. Bleah. */ every register reference. Bleah. */
else if (len == 8) else if (len == 8)
addr = (HPPAH_OFFSETOF (save_state_t, ss_wide) addr = (HPPAH_OFFSETOF (save_state_t, ss_wide)
+ REGISTER_BYTE (regno)); + DEPRECATED_REGISTER_BYTE (regno));
/* Narrow registers come from the ss_narrow area. Note that /* Narrow registers come from the ss_narrow area. Note that
ss_narrow starts with gr1, not gr0. */ ss_narrow starts with gr1, not gr0. */
else if (len == 4) else if (len == 4)
addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow) addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (1))); + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (1)));
else else
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__,
"hppah-nat.c (write_register): unexpected register size"); "hppah-nat.c (write_register): unexpected register size");
@ -128,7 +128,7 @@ store_inferior_registers (int regno)
{ {
CORE_ADDR temp; CORE_ADDR temp;
temp = *(CORE_ADDR *)&deprecated_registers[REGISTER_BYTE (regno)]; temp = *(CORE_ADDR *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
/* Set the priv level (stored in the low two bits of the PC. */ /* Set the priv level (stored in the low two bits of the PC. */
temp |= 0x3; temp |= 0x3;
@ -153,7 +153,7 @@ store_inferior_registers (int regno)
the high part of IPSW. What will it take for HP to catch a the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */ clue about building sensible interfaces? */
if (regno == IPSW_REGNUM && len == 8) if (regno == IPSW_REGNUM && len == 8)
*(int *)&deprecated_registers[REGISTER_BYTE (regno)] = 0; *(int *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)] = 0;
#endif #endif
for (i = 0; i < len; i += sizeof (int)) for (i = 0; i < len; i += sizeof (int))
@ -161,7 +161,7 @@ store_inferior_registers (int regno)
errno = 0; errno = 0;
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid), call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i, (PTRACE_ARG3_TYPE) addr + i,
*(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]); *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno) + i]);
if (errno != 0) if (errno != 0)
{ {
/* Warning, not error, in case we are attached; sometimes /* Warning, not error, in case we are attached; sometimes
@ -216,7 +216,7 @@ fetch_register (int regno)
/* Floating-point registers come from the ss_fpblock area. */ /* Floating-point registers come from the ss_fpblock area. */
else if (regno >= FP0_REGNUM) else if (regno >= FP0_REGNUM)
addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock) addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (FP0_REGNUM))); + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (FP0_REGNUM)));
/* Wide registers come from the ss_wide area. /* Wide registers come from the ss_wide area.
I think it's more PC to test (ss_flags & SS_WIDEREGS) to select I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
@ -225,13 +225,13 @@ fetch_register (int regno)
every register reference. Bleah. */ every register reference. Bleah. */
else if (len == 8) else if (len == 8)
addr = (HPPAH_OFFSETOF (save_state_t, ss_wide) addr = (HPPAH_OFFSETOF (save_state_t, ss_wide)
+ REGISTER_BYTE (regno)); + DEPRECATED_REGISTER_BYTE (regno));
/* Narrow registers come from the ss_narrow area. Note that /* Narrow registers come from the ss_narrow area. Note that
ss_narrow starts with gr1, not gr0. */ ss_narrow starts with gr1, not gr0. */
else if (len == 4) else if (len == 4)
addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow) addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (1))); + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (1)));
else else
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__,

View File

@ -115,15 +115,15 @@ store_inferior_registers (int regno)
*/ */
if (regno > 0 && regno < NUM_REGS) if (regno > 0 && regno < NUM_REGS)
{ {
memcpy (&state[regno], &deprecated_registers[REGISTER_BYTE (regno)], memcpy (&state[regno], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
} }
else else
{ {
for (index = 0; index < NUM_REGS; index++) for (index = 0; index < NUM_REGS; index++)
memcpy (&state[index], &deprecated_registers[REGISTER_BYTE (index)], memcpy (&state[index], &deprecated_registers[DEPRECATED_REGISTER_BYTE (index)],
REGISTER_RAW_SIZE (index)); REGISTER_RAW_SIZE (index));
/* state[index] = deprecated_registers[REGISTER_BYTE (index)]; */ /* state[index] = deprecated_registers[DEPRECATED_REGISTER_BYTE (index)]; */
} }

View File

@ -357,19 +357,19 @@ hpux_thread_store_registers (int regno)
else if (regno == SP_REGNUM) else if (regno == SP_REGNUM)
{ {
write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp, write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp,
&deprecated_registers[REGISTER_BYTE (regno)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *) tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
(extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)], (extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)) + 160); REGISTER_RAW_SIZE (regno)) + 160);
} }
else if (regno == PC_REGNUM) else if (regno == PC_REGNUM)
write_memory (sp - 20, write_memory (sp - 20,
&deprecated_registers[REGISTER_BYTE (regno)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
else else
write_memory (sp + regmap[regno], write_memory (sp + regmap[regno],
&deprecated_registers[REGISTER_BYTE (regno)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
} }
} }

View File

@ -256,7 +256,7 @@ gnu_store_registers (int regno)
} }
#define fill(state, regno) \ #define fill(state, regno) \
memcpy (REG_ADDR(state, regno), &deprecated_registers[REGISTER_BYTE (regno)], \ memcpy (REG_ADDR(state, regno), &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)], \
REGISTER_RAW_SIZE (regno)) REGISTER_RAW_SIZE (regno))
if (regno == -1) if (regno == -1)

View File

@ -86,7 +86,7 @@ fill_gregset (prgregset_t *gregsetp, int regno)
#define COPY_REG(_fld_,_regi_) \ #define COPY_REG(_fld_,_regi_) \
if ((regno == -1) || regno == _regi_) \ if ((regno == -1) || regno == _regi_) \
memcpy (&(gregsetp->_fld_), &deprecated_registers[REGISTER_BYTE (_regi_)], \ memcpy (&(gregsetp->_fld_), &deprecated_registers[DEPRECATED_REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_)) REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++) for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@ -109,10 +109,10 @@ fill_gregset (prgregset_t *gregsetp, int regno)
if (regno == IA64_BSP_REGNUM || regno == -1) if (regno == IA64_BSP_REGNUM || regno == -1)
{ {
memcpy (&(gregsetp->__bspstore), memcpy (&(gregsetp->__bspstore),
&deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM)); REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
memcpy (&deprecated_registers[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
&deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM)); REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
} }
@ -154,7 +154,7 @@ fill_fpregset (prfpregset_t *fpregsetp, int regno)
{ {
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]); to = (char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi)); memcpy (to, from, REGISTER_RAW_SIZE (regi));
} }

View File

@ -402,7 +402,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \ #define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \ if ((regno == -1) || regno == _regi_) \
memcpy (regp + _idx_, &deprecated_registers[REGISTER_BYTE (_regi_)], \ memcpy (regp + _idx_, &deprecated_registers[DEPRECATED_REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_)) REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++) for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@ -467,7 +467,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{ {
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]); to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi)); memcpy (to, from, REGISTER_RAW_SIZE (regi));
} }

View File

@ -83,27 +83,27 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= CTX_RA; regi++) for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
*(regp + regi) = *(regp + regi) =
extract_signed_integer (&deprecated_registers[REGISTER_BYTE (regi)], extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)],
REGISTER_RAW_SIZE (regi)); REGISTER_RAW_SIZE (regi));
if ((regno == -1) || (regno == PC_REGNUM)) if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) = *(regp + CTX_EPC) =
extract_signed_integer (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)], extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
REGISTER_RAW_SIZE (PC_REGNUM)); REGISTER_RAW_SIZE (PC_REGNUM));
if ((regno == -1) || (regno == CAUSE_REGNUM)) if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CTX_CAUSE) = *(regp + CTX_CAUSE) =
extract_signed_integer (&deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)], extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)],
REGISTER_RAW_SIZE (CAUSE_REGNUM)); REGISTER_RAW_SIZE (CAUSE_REGNUM));
if ((regno == -1) || (regno == HI_REGNUM)) if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) = *(regp + CTX_MDHI) =
extract_signed_integer (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)], extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
REGISTER_RAW_SIZE (HI_REGNUM)); REGISTER_RAW_SIZE (HI_REGNUM));
if ((regno == -1) || (regno == LO_REGNUM)) if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CTX_MDLO) = *(regp + CTX_MDLO) =
extract_signed_integer (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)], extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM)); REGISTER_RAW_SIZE (LO_REGNUM));
} }
@ -145,14 +145,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{ {
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]); to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi)); memcpy (to, from, REGISTER_RAW_SIZE (regi));
} }
} }
if ((regno == -1) || (regno == FCRCS_REGNUM)) if ((regno == -1) || (regno == FCRCS_REGNUM))
fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)]; fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)];
} }

View File

@ -297,7 +297,7 @@ fetch_inferior_registers (int regno)
supply_register (G0_REGNUM, buf); supply_register (G0_REGNUM, buf);
supply_register (TBR_REGNUM, (char *) &ec.tbr); supply_register (TBR_REGNUM, (char *) &ec.tbr);
memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)], &ec.g1,
4 * REGISTER_RAW_SIZE (G1_REGNUM)); 4 * REGISTER_RAW_SIZE (G1_REGNUM));
for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++) for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -308,7 +308,7 @@ fetch_inferior_registers (int regno)
supply_register (NPC_REGNUM, (char *) &ec.npc); supply_register (NPC_REGNUM, (char *) &ec.npc);
supply_register (WIM_REGNUM, (char *) &ec.wim); supply_register (WIM_REGNUM, (char *) &ec.wim);
memcpy (&deprecated_registers[REGISTER_BYTE (O0_REGNUM)], ec.o, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)], ec.o,
8 * REGISTER_RAW_SIZE (O0_REGNUM)); 8 * REGISTER_RAW_SIZE (O0_REGNUM));
for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++) for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -322,13 +322,13 @@ fetch_inferior_registers (int regno)
sp = read_register (SP_REGNUM); sp = read_register (SP_REGNUM);
target_read_memory (sp + FRAME_SAVED_I0, target_read_memory (sp + FRAME_SAVED_I0,
&deprecated_registers[REGISTER_BYTE (I0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM)); 8 * REGISTER_RAW_SIZE (I0_REGNUM));
for (i = I0_REGNUM; i <= I7_REGNUM; i++) for (i = I0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
target_read_memory (sp + FRAME_SAVED_L0, target_read_memory (sp + FRAME_SAVED_L0,
&deprecated_registers[REGISTER_BYTE (L0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM)); 8 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++) for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -346,7 +346,7 @@ fetch_inferior_registers (int regno)
if (errno) if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)"); perror_with_name ("ptrace(PTRACE_GETFPREGS)");
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
32 * REGISTER_RAW_SIZE (FP0_REGNUM)); 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++) for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -384,7 +384,7 @@ store_inferior_registers (int regno)
int retval; int retval;
ec.tbr = read_register (TBR_REGNUM); ec.tbr = read_register (TBR_REGNUM);
memcpy (&ec.g1, &deprecated_registers[REGISTER_BYTE (G1_REGNUM)], memcpy (&ec.g1, &deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
4 * REGISTER_RAW_SIZE (G1_REGNUM)); 4 * REGISTER_RAW_SIZE (G1_REGNUM));
ec.psr = read_register (PS_REGNUM); ec.psr = read_register (PS_REGNUM);
@ -393,7 +393,7 @@ store_inferior_registers (int regno)
ec.npc = read_register (NPC_REGNUM); ec.npc = read_register (NPC_REGNUM);
ec.wim = read_register (WIM_REGNUM); ec.wim = read_register (WIM_REGNUM);
memcpy (ec.o, &deprecated_registers[REGISTER_BYTE (O0_REGNUM)], memcpy (ec.o, &deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)],
8 * REGISTER_RAW_SIZE (O0_REGNUM)); 8 * REGISTER_RAW_SIZE (O0_REGNUM));
errno = 0; errno = 0;
@ -415,11 +415,11 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[L0_REGNUM + 5]) if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + FRAME_SAVED_I0, target_write_memory (sp + FRAME_SAVED_I0,
&deprecated_registers[REGISTER_BYTE (I0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM)); 8 * REGISTER_RAW_SIZE (I0_REGNUM));
target_write_memory (sp + FRAME_SAVED_L0, target_write_memory (sp + FRAME_SAVED_L0,
&deprecated_registers[REGISTER_BYTE (L0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM)); 8 * REGISTER_RAW_SIZE (L0_REGNUM));
} }
else if (regno >= L0_REGNUM && regno <= I7_REGNUM) else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
@ -427,13 +427,13 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[regno]) if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7) if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM) regoffset = DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (L0_REGNUM)
+ FRAME_SAVED_L0; + FRAME_SAVED_L0;
else else
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM) regoffset = DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (I0_REGNUM)
+ FRAME_SAVED_I0; + FRAME_SAVED_I0;
target_write_memory (sp + regoffset, target_write_memory (sp + regoffset,
&deprecated_registers[REGISTER_BYTE (regno)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
} }
} }
@ -450,7 +450,7 @@ store_inferior_registers (int regno)
if (errno) if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)"); perror_with_name ("ptrace(PTRACE_GETFPREGS)");
memcpy (fc.f.fregs, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (fc.f.fregs, &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
32 * REGISTER_RAW_SIZE (FP0_REGNUM)); 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
fc.fsr = read_register (FPS_REGNUM); fc.fsr = read_register (FPS_REGNUM);
@ -574,7 +574,7 @@ store_inferior_registers (int regno)
{ {
unsigned int reg; unsigned int reg;
reg = *(unsigned int *) &deprecated_registers[REGISTER_BYTE (regno) + i]; reg = *(unsigned int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno) + i];
errno = 0; errno = 0;
ptrace (ptrace_fun, PIDGET (inferior_ptid), ptrace (ptrace_fun, PIDGET (inferior_ptid),

View File

@ -36,12 +36,12 @@ fetch_inferior_registers (int regno)
ptrace (PT_GETREGS, PIDGET (inferior_ptid), ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0); (PTRACE_ARG3_TYPE) & inferior_registers, 0);
memcpy (&deprecated_registers[REGISTER_BYTE (0)], &inferior_registers, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)], &inferior_registers,
sizeof (inferior_registers)); sizeof (inferior_registers));
ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0); (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
sizeof (inferior_fp_registers)); sizeof (inferior_fp_registers));
deprecated_registers_fetched (); deprecated_registers_fetched ();
@ -53,12 +53,12 @@ store_inferior_registers (int regno)
struct reg inferior_registers; struct reg inferior_registers;
struct fpreg inferior_fp_registers; struct fpreg inferior_fp_registers;
memcpy (&inferior_registers, &deprecated_registers[REGISTER_BYTE (0)], memcpy (&inferior_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (0)],
sizeof (inferior_registers)); sizeof (inferior_registers));
ptrace (PT_SETREGS, PIDGET (inferior_ptid), ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0); (PTRACE_ARG3_TYPE) & inferior_registers, 0);
memcpy (&inferior_fp_registers, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&inferior_fp_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
sizeof (inferior_fp_registers)); sizeof (inferior_fp_registers));
ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0); (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
@ -77,10 +77,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct md_core *core_reg = (struct md_core *) core_reg_sect; struct md_core *core_reg = (struct md_core *) core_reg_sect;
/* Integer registers */ /* Integer registers */
memcpy (&deprecated_registers[REGISTER_BYTE (0)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)],
&core_reg->intreg, sizeof (struct reg)); &core_reg->intreg, sizeof (struct reg));
/* Floating point registers */ /* Floating point registers */
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&core_reg->freg, sizeof (struct fpreg)); &core_reg->freg, sizeof (struct fpreg));
} }

View File

@ -952,7 +952,7 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
static CORE_ADDR static CORE_ADDR
mcore_extract_struct_value_address (char *regbuf) mcore_extract_struct_value_address (char *regbuf)
{ {
return extract_unsigned_integer (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE); return extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
} }
/* Given a function which returns a value of type TYPE, extract the /* Given a function which returns a value of type TYPE, extract the
@ -965,7 +965,7 @@ mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */ /* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */
/* Only getting the first byte! if len = 1, we need the last byte of /* Only getting the first byte! if len = 1, we need the last byte of
the register, not the first. */ the register, not the first. */
memcpy (valbuf, regbuf + REGISTER_BYTE (RETVAL_REGNUM) + memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (RETVAL_REGNUM) +
(TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0), TYPE_LENGTH (type)); (TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0), TYPE_LENGTH (type));
} }
@ -991,11 +991,11 @@ mcore_store_return_value (struct type *type, char *valbuf)
/* Return value fits into registers. */ /* Return value fits into registers. */
return_size = (value_size + DEPRECATED_REGISTER_SIZE - 1) & ~(DEPRECATED_REGISTER_SIZE - 1); return_size = (value_size + DEPRECATED_REGISTER_SIZE - 1) & ~(DEPRECATED_REGISTER_SIZE - 1);
offset = REGISTER_BYTE (RETVAL_REGNUM) + (return_size - value_size); offset = DEPRECATED_REGISTER_BYTE (RETVAL_REGNUM) + (return_size - value_size);
zeros = alloca (return_size); zeros = alloca (return_size);
memset (zeros, 0, return_size); memset (zeros, 0, return_size);
deprecated_write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (RETVAL_REGNUM), zeros,
return_size); return_size);
deprecated_write_register_bytes (offset, valbuf, value_size); deprecated_write_register_bytes (offset, valbuf, value_size);
} }

View File

@ -1,3 +1,7 @@
2003-09-17 Andrew Cagney <cagney@redhat.com>
* mi/mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
2003-09-10 Elena Zannoni <ezannoni@redhat.com> 2003-09-10 Elena Zannoni <ezannoni@redhat.com>
* mi-main.c (mi_setup_architecture_data): Don't use * mi-main.c (mi_setup_architecture_data): Don't use

View File

@ -405,13 +405,13 @@ register_changed_p (int regnum)
if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer)) if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
return -1; return -1;
if (memcmp (&old_regs[REGISTER_BYTE (regnum)], raw_buffer, if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
REGISTER_RAW_SIZE (regnum)) == 0) REGISTER_RAW_SIZE (regnum)) == 0)
return 0; return 0;
/* Found a changed register. Return 1. */ /* Found a changed register. Return 1. */
memcpy (&old_regs[REGISTER_BYTE (regnum)], raw_buffer, memcpy (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
REGISTER_RAW_SIZE (regnum)); REGISTER_RAW_SIZE (regnum));
return 1; return 1;
@ -642,7 +642,7 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
old_chain = make_cleanup (xfree, buffer); old_chain = make_cleanup (xfree, buffer);
store_signed_integer (buffer, DEPRECATED_REGISTER_SIZE, value); store_signed_integer (buffer, DEPRECATED_REGISTER_SIZE, value);
/* Write it down */ /* Write it down */
deprecated_write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum)); deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
/* Free the buffer. */ /* Free the buffer. */
do_cleanups (old_chain); do_cleanups (old_chain);
} }

View File

@ -216,13 +216,13 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32)) if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regno)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM); to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM)); memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
} }
else if (regno == FCRCS_REGNUM) else if (regno == FCRCS_REGNUM)
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regno)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32); to = (char *) (*fpregsetp + 32);
memcpy (to, from, REGISTER_RAW_SIZE (regno)); memcpy (to, from, REGISTER_RAW_SIZE (regno));
} }
@ -491,13 +491,13 @@ mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32)) if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regno)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM); to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM)); memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
} }
else if (regno == FCRCS_REGNUM) else if (regno == FCRCS_REGNUM)
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regno)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32); to = (char *) (*fpregsetp + 32);
memcpy (to, from, REGISTER_RAW_SIZE (regno)); memcpy (to, from, REGISTER_RAW_SIZE (regno));
} }

View File

@ -654,7 +654,7 @@ mips_register_raw_size (int regnum)
NOTE: cagney/2003-06-15: This is so bogus. The register's NOTE: cagney/2003-06-15: This is so bogus. The register's
raw size is changing according to the ABI raw size is changing according to the ABI
(FP_REGISTER_DOUBLE). Also, GDB's protocol is defined by a (FP_REGISTER_DOUBLE). Also, GDB's protocol is defined by a
combination of REGISTER_RAW_SIZE and REGISTER_BYTE. */ combination of REGISTER_RAW_SIZE and DEPRECATED_REGISTER_BYTE. */
if (mips64_transfers_32bit_regs_p) if (mips64_transfers_32bit_regs_p)
return REGISTER_VIRTUAL_SIZE (regnum); return REGISTER_VIRTUAL_SIZE (regnum);
else if (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32 else if (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32
@ -4742,12 +4742,12 @@ mips_eabi_extract_return_value (struct type *valtype,
return_value_location (valtype, &hi, &lo); return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset, memcpy (valbuf + lo.buf_offset,
regbuf + REGISTER_BYTE (lo.reg) + lo.reg_offset, regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
lo.len); lo.len);
if (hi.len > 0) if (hi.len > 0)
memcpy (valbuf + hi.buf_offset, memcpy (valbuf + hi.buf_offset,
regbuf + REGISTER_BYTE (hi.reg) + hi.reg_offset, regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
hi.len); hi.len);
} }
@ -4761,12 +4761,12 @@ mips_o64_extract_return_value (struct type *valtype,
return_value_location (valtype, &hi, &lo); return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset, memcpy (valbuf + lo.buf_offset,
regbuf + REGISTER_BYTE (lo.reg) + lo.reg_offset, regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
lo.len); lo.len);
if (hi.len > 0) if (hi.len > 0)
memcpy (valbuf + hi.buf_offset, memcpy (valbuf + hi.buf_offset,
regbuf + REGISTER_BYTE (hi.reg) + hi.reg_offset, regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
hi.len); hi.len);
} }
@ -4783,14 +4783,14 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer)); memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len); memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
REGISTER_RAW_SIZE (lo.reg)); REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0) if (hi.len > 0)
{ {
memset (raw_buffer, 0, sizeof (raw_buffer)); memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len); memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
REGISTER_RAW_SIZE (hi.reg)); REGISTER_RAW_SIZE (hi.reg));
} }
} }
@ -4805,14 +4805,14 @@ mips_o64_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer)); memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len); memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
REGISTER_RAW_SIZE (lo.reg)); REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0) if (hi.len > 0)
{ {
memset (raw_buffer, 0, sizeof (raw_buffer)); memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len); memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
REGISTER_RAW_SIZE (hi.reg)); REGISTER_RAW_SIZE (hi.reg));
} }
} }

View File

@ -75,19 +75,19 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= 32; regi++) for (regi = 0; regi <= 32; regi++)
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
*(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)]; *(regp + regi) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM)) if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)]; *(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM)) if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)]; *(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM)) if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)]; *(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)];
if ((regno == -1) || (regno == LO_REGNUM)) if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)]; *(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)];
} }
/* /*
@ -125,14 +125,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{ {
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]); to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi)); memcpy (to, from, REGISTER_RAW_SIZE (regi));
} }
} }
if ((regno == -1) || (regno == FCRCS_REGNUM)) if ((regno == -1) || (regno == FCRCS_REGNUM))
fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)]; fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)];
} }

View File

@ -125,15 +125,15 @@ static void
mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf) mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{ {
if (TYPE_CODE (type) == TYPE_CODE_PTR) if (TYPE_CODE (type) == TYPE_CODE_PTR)
memcpy (valbuf, regbuf + REGISTER_BYTE (4), TYPE_LENGTH (type)); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (4), TYPE_LENGTH (type));
else else
memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (type)); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (0), TYPE_LENGTH (type));
} }
static CORE_ADDR static CORE_ADDR
mn10300_extract_struct_value_address (char *regbuf) mn10300_extract_struct_value_address (char *regbuf)
{ {
return extract_unsigned_integer (regbuf + REGISTER_BYTE (4), return extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (4),
REGISTER_RAW_SIZE (4)); REGISTER_RAW_SIZE (4));
} }
@ -141,10 +141,10 @@ static void
mn10300_store_return_value (struct type *type, char *valbuf) mn10300_store_return_value (struct type *type, char *valbuf)
{ {
if (TYPE_CODE (type) == TYPE_CODE_PTR) if (TYPE_CODE (type) == TYPE_CODE_PTR)
deprecated_write_register_bytes (REGISTER_BYTE (4), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (4), valbuf,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
else else
deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (0), valbuf,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }

View File

@ -483,7 +483,7 @@ static void
ns32k_extract_return_value (struct type *valtype, char *regbuf, char *valbuf) ns32k_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
{ {
memcpy (valbuf, memcpy (valbuf,
regbuf + REGISTER_BYTE (TYPE_CODE (valtype) == TYPE_CODE_FLT ? regbuf + DEPRECATED_REGISTER_BYTE (TYPE_CODE (valtype) == TYPE_CODE_FLT ?
FP0_REGNUM : 0), TYPE_LENGTH (valtype)); FP0_REGNUM : 0), TYPE_LENGTH (valtype));
} }
@ -498,7 +498,7 @@ ns32k_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR static CORE_ADDR
ns32k_extract_struct_value_address (char *regbuf) ns32k_extract_struct_value_address (char *regbuf)
{ {
return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0))); return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
} }
void void

View File

@ -32,10 +32,10 @@
#include "regcache.h" #include "regcache.h"
#define RF(dst, src) \ #define RF(dst, src) \
memcpy(&deprecated_registers[REGISTER_BYTE(dst)], &src, sizeof(src)) memcpy(&deprecated_registers[DEPRECATED_REGISTER_BYTE(dst)], &src, sizeof(src))
#define RS(src, dst) \ #define RS(src, dst) \
memcpy(&dst, &deprecated_registers[REGISTER_BYTE(src)], sizeof(dst)) memcpy(&dst, &deprecated_registers[DEPRECATED_REGISTER_BYTE(src)], sizeof(dst))
void void
fetch_inferior_registers (int regno) fetch_inferior_registers (int regno)

View File

@ -295,7 +295,7 @@ bdm_ppc_store_registers (int regno)
&& ((i < FP0_REGNUM) || (i > FPLAST_REGNUM))) && ((i < FP0_REGNUM) || (i > FPLAST_REGNUM)))
{ {
/* printf("write valid reg %d\n", bdm_regno); */ /* printf("write valid reg %d\n", bdm_regno); */
ocd_write_bdm_registers (bdm_regno, deprecated_registers + REGISTER_BYTE (i), 4); ocd_write_bdm_registers (bdm_regno, deprecated_registers + DEPRECATED_REGISTER_BYTE (i), 4);
} }
/* /*
else if (i == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum) else if (i == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)

View File

@ -93,12 +93,13 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
gdb_assert (gdbarch != NULL); gdb_assert (gdbarch != NULL);
/* Compute the offset of each register. Legacy architectures define /* Compute the offset of each register. Legacy architectures define
REGISTER_BYTE() so use that. */ DEPRECATED_REGISTER_BYTE() so use that. */
/* FIXME: cagney/2002-11-07: Instead of using REGISTER_BYTE() this /* FIXME: cagney/2002-11-07: Instead of using
code should, as is done in init_regcache_descr(), compute the DEPRECATED_REGISTER_BYTE() this code should, as is done in
offets at runtime. This currently isn't possible as some ISAs init_regcache_descr(), compute the offets at runtime. This
define overlapping register regions - see the mess in currently isn't possible as some ISAs define overlapping register
read_register_bytes() and write_register_bytes() registers. */ regions - see the mess in read_register_bytes() and
write_register_bytes() registers. */
descr->sizeof_register descr->sizeof_register
= GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long); = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
descr->register_offset descr->register_offset
@ -106,11 +107,11 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
for (i = 0; i < descr->nr_cooked_registers; i++) for (i = 0; i < descr->nr_cooked_registers; i++)
{ {
/* FIXME: cagney/2001-12-04: This code shouldn't need to use /* FIXME: cagney/2001-12-04: This code shouldn't need to use
REGISTER_BYTE(). Unfortunatly, legacy code likes to lay the DEPRECATED_REGISTER_BYTE(). Unfortunatly, legacy code likes
buffer out so that certain registers just happen to overlap. to lay the buffer out so that certain registers just happen
Ulgh! New targets use gdbarch's register read/write and to overlap. Ulgh! New targets use gdbarch's register
entirely avoid this uglyness. */ read/write and entirely avoid this uglyness. */
descr->register_offset[i] = REGISTER_BYTE (i); descr->register_offset[i] = DEPRECATED_REGISTER_BYTE (i);
descr->sizeof_register[i] = REGISTER_RAW_SIZE (i); descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
gdb_assert (MAX_REGISTER_SIZE >= REGISTER_RAW_SIZE (i)); gdb_assert (MAX_REGISTER_SIZE >= REGISTER_RAW_SIZE (i));
gdb_assert (MAX_REGISTER_SIZE >= REGISTER_VIRTUAL_SIZE (i)); gdb_assert (MAX_REGISTER_SIZE >= REGISTER_VIRTUAL_SIZE (i));
@ -130,8 +131,8 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
/* Keep extending the buffer so that there is always enough /* Keep extending the buffer so that there is always enough
space for all registers. The comparison is necessary since space for all registers. The comparison is necessary since
legacy code is free to put registers in random places in the legacy code is free to put registers in random places in the
buffer separated by holes. Once REGISTER_BYTE() is killed buffer separated by holes. Once DEPRECATED_REGISTER_BYTE()
this can be greatly simplified. */ is killed this can be greatly simplified. */
regend = descr->register_offset[i] + descr->sizeof_register[i]; regend = descr->register_offset[i] + descr->sizeof_register[i];
if (descr->sizeof_cooked_registers < regend) if (descr->sizeof_cooked_registers < regend)
descr->sizeof_cooked_registers = regend; descr->sizeof_cooked_registers = regend;
@ -185,16 +186,17 @@ init_regcache_descr (struct gdbarch *gdbarch)
/* If an old style architecture, fill in the remainder of the /* If an old style architecture, fill in the remainder of the
register cache descriptor using the register macros. */ register cache descriptor using the register macros. */
/* NOTE: cagney/2003-06-29: If either of REGISTER_BYTE or /* NOTE: cagney/2003-06-29: If either of DEPRECATED_REGISTER_BYTE or
REGISTER_RAW_SIZE are still present, things are most likely REGISTER_RAW_SIZE are still present, things are most likely
totally screwed. Ex: an architecture with raw register sizes totally screwed. Ex: an architecture with raw register sizes
smaller than what REGISTER_BYTE indicates; non monotonic smaller than what DEPRECATED_REGISTER_BYTE indicates; non
REGISTER_BYTE values. For GDB 6 check for these nasty methods monotonic DEPRECATED_REGISTER_BYTE values. For GDB 6 check for
and fall back to legacy code when present. Sigh! */ these nasty methods and fall back to legacy code when present.
Sigh! */
if ((!gdbarch_pseudo_register_read_p (gdbarch) if ((!gdbarch_pseudo_register_read_p (gdbarch)
&& !gdbarch_pseudo_register_write_p (gdbarch) && !gdbarch_pseudo_register_write_p (gdbarch)
&& !gdbarch_register_type_p (gdbarch)) && !gdbarch_register_type_p (gdbarch))
|| REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ()) || DEPRECATED_REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ())
{ {
descr->legacy_p = 1; descr->legacy_p = 1;
init_legacy_regcache_descr (gdbarch, descr); init_legacy_regcache_descr (gdbarch, descr);
@ -233,12 +235,12 @@ init_regcache_descr (struct gdbarch *gdbarch)
descr->sizeof_raw_registers = descr->sizeof_cooked_registers; descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
/* Sanity check. Confirm that there is agreement between the /* Sanity check. Confirm that there is agreement between the
regcache and the target's redundant REGISTER_BYTE (new targets regcache and the target's redundant DEPRECATED_REGISTER_BYTE (new
should not even be defining it). */ targets should not even be defining it). */
for (i = 0; i < descr->nr_cooked_registers; i++) for (i = 0; i < descr->nr_cooked_registers; i++)
{ {
if (REGISTER_BYTE_P ()) if (DEPRECATED_REGISTER_BYTE_P ())
gdb_assert (descr->register_offset[i] == REGISTER_BYTE (i)); gdb_assert (descr->register_offset[i] == DEPRECATED_REGISTER_BYTE (i));
#if 0 #if 0
gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i)); gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i));
gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i)); gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
@ -650,7 +652,7 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
int end; int end;
int byte; int byte;
reg_start = REGISTER_BYTE (regnum); reg_start = DEPRECATED_REGISTER_BYTE (regnum);
reg_len = REGISTER_RAW_SIZE (regnum); reg_len = REGISTER_RAW_SIZE (regnum);
reg_end = reg_start + reg_len; reg_end = reg_start + reg_len;
@ -1012,7 +1014,7 @@ deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
{ {
int regstart, regend; int regstart, regend;
regstart = REGISTER_BYTE (regnum); regstart = DEPRECATED_REGISTER_BYTE (regnum);
regend = regstart + REGISTER_RAW_SIZE (regnum); regend = regstart + REGISTER_RAW_SIZE (regnum);
/* Is this register completely outside the range the user is writing? */ /* Is this register completely outside the range the user is writing? */
@ -1517,7 +1519,7 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
fprintf_unfiltered (file, " %6ld", fprintf_unfiltered (file, " %6ld",
regcache->descr->register_offset[regnum]); regcache->descr->register_offset[regnum]);
if (register_offset != regcache->descr->register_offset[regnum] if (register_offset != regcache->descr->register_offset[regnum]
|| register_offset != REGISTER_BYTE (regnum) || register_offset != DEPRECATED_REGISTER_BYTE (regnum)
|| (regnum > 0 || (regnum > 0
&& (regcache->descr->register_offset[regnum] && (regcache->descr->register_offset[regnum]
!= (regcache->descr->register_offset[regnum - 1] != (regcache->descr->register_offset[regnum - 1]

View File

@ -499,7 +499,7 @@ sds_fetch_registers (int regno)
/* (should warn about reply too short) */ /* (should warn about reply too short) */
for (i = 0; i < NUM_REGS; i++) for (i = 0; i < NUM_REGS; i++)
supply_register (i, &regs[REGISTER_BYTE (i)]); supply_register (i, &regs[DEPRECATED_REGISTER_BYTE (i)]);
} }
/* Prepare to store registers. Since we may send them all, we have to /* Prepare to store registers. Since we may send them all, we have to

View File

@ -88,10 +88,10 @@ vx_read_register (int regno)
bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers, bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
16 * MC68K_GREG_SIZE); 16 * MC68K_GREG_SIZE);
bcopy (&mc68k_greg_packet[MC68K_R_SR], bcopy (&mc68k_greg_packet[MC68K_R_SR],
&deprecated_registers[REGISTER_BYTE (PS_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
MC68K_GREG_SIZE); MC68K_GREG_SIZE);
bcopy (&mc68k_greg_packet[MC68K_R_PC], bcopy (&mc68k_greg_packet[MC68K_R_PC],
&deprecated_registers[REGISTER_BYTE (PC_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
MC68K_GREG_SIZE); MC68K_GREG_SIZE);
/* Get floating-point registers, if the target system has them. /* Get floating-point registers, if the target system has them.
@ -103,17 +103,17 @@ vx_read_register (int regno)
PTRACE_GETFPREGS); PTRACE_GETFPREGS);
bcopy (&mc68k_fpreg_packet[MC68K_R_FP0], bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8); MC68K_FPREG_SIZE * 8);
bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR], bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8)); MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
} }
else else
{ {
bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8); MC68K_FPREG_SIZE * 8);
bzero (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8)); MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
} }
@ -136,9 +136,9 @@ vx_write_register (int regno)
bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0], bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0],
16 * MC68K_GREG_SIZE); 16 * MC68K_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
&mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE); &mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
&mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE); &mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS); net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
@ -147,10 +147,10 @@ vx_write_register (int regno)
if (target_has_fp) if (target_has_fp)
{ {
bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FP0], &mc68k_fpreg_packet[MC68K_R_FP0],
MC68K_FPREG_SIZE * 8); MC68K_FPREG_SIZE * 8);
bcopy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FPCR], &mc68k_fpreg_packet[MC68K_R_FPCR],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8)); MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));

View File

@ -109,13 +109,13 @@ vx_read_register (int regno)
/* Copy SR, LO, HI, and PC. */ /* Copy SR, LO, HI, and PC. */
bcopy (&mips_greg_packet[MIPS_R_SR], bcopy (&mips_greg_packet[MIPS_R_SR],
&deprecated_registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE); &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO], bcopy (&mips_greg_packet[MIPS_R_LO],
&deprecated_registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE); &deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI], bcopy (&mips_greg_packet[MIPS_R_HI],
&deprecated_registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE); &deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC], bcopy (&mips_greg_packet[MIPS_R_PC],
&deprecated_registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE); &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them. /* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in Otherwise, zero the floating point register values in
@ -130,20 +130,20 @@ vx_read_register (int regno)
/* Copy the floating point registers. */ /* Copy the floating point registers. */
bcopy (&mips_fpreg_packet[MIPS_R_FP0], bcopy (&mips_fpreg_packet[MIPS_R_FP0],
&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32); REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */ /* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR], bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
&deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM)); REGISTER_RAW_SIZE (FCRCS_REGNUM));
} }
else else
{ {
bzero ((char *) &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bzero ((char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32); REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
bzero ((char *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)], bzero ((char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM)); REGISTER_RAW_SIZE (FCRCS_REGNUM));
} }
@ -168,13 +168,13 @@ vx_write_register (int regno)
/* Copy SR, LO, HI, and PC. */ /* Copy SR, LO, HI, and PC. */
bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE); &mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE); &mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE); &mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE); &mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS); net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
@ -185,13 +185,13 @@ vx_write_register (int regno)
{ {
/* Copy the floating point data registers. */ /* Copy the floating point data registers. */
bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&mips_fpreg_packet[MIPS_R_FP0], &mips_fpreg_packet[MIPS_R_FP0],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32); REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */ /* Copy the floating point control/status register (fpcsr). */
bcopy (&deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR], &mips_fpreg_packet[MIPS_R_FPCSR],
REGISTER_RAW_SIZE (FCRCS_REGNUM)); REGISTER_RAW_SIZE (FCRCS_REGNUM));

View File

@ -92,18 +92,18 @@ vx_read_register (int regno)
as defined in "tm-sparc.h". */ as defined in "tm-sparc.h". */
bcopy (&sparc_greg_packet[SPARC_R_G0], bcopy (&sparc_greg_packet[SPARC_R_G0],
&deprecated_registers[REGISTER_BYTE (G0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (G0_REGNUM)],
32 * SPARC_GREG_SIZE); 32 * SPARC_GREG_SIZE);
bcopy (&sparc_greg_packet[SPARC_R_Y], bcopy (&sparc_greg_packet[SPARC_R_Y],
&deprecated_registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE); &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
/* Now write the local and in registers to the register window spill /* Now write the local and in registers to the register window spill
area in the frame. VxWorks does not do this for the active frame area in the frame. VxWorks does not do this for the active frame
automatically; it greatly simplifies debugging. */ automatically; it greatly simplifies debugging. */
sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)], sp = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM)); REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)], write_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)); 16 * REGISTER_RAW_SIZE (L0_REGNUM));
/* If the target has floating point registers, fetch them. /* If the target has floating point registers, fetch them.
@ -116,17 +116,17 @@ vx_read_register (int regno)
net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN, net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
PTRACE_GETFPREGS); PTRACE_GETFPREGS);
bcopy (&sparc_fpreg_packet[SPARC_R_FP0], bcopy (&sparc_fpreg_packet[SPARC_R_FP0],
&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
32 * SPARC_FPREG_SIZE); 32 * SPARC_FPREG_SIZE);
bcopy (&sparc_fpreg_packet[SPARC_R_FSR], bcopy (&sparc_fpreg_packet[SPARC_R_FSR],
&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
1 * SPARC_FPREG_SIZE); 1 * SPARC_FPREG_SIZE);
} }
else else
{ {
bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
32 * SPARC_FPREG_SIZE); 32 * SPARC_FPREG_SIZE);
bzero (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
1 * SPARC_FPREG_SIZE); 1 * SPARC_FPREG_SIZE);
} }
@ -164,9 +164,9 @@ vx_write_register (int regno)
} }
if (in_gp_regs) if (in_gp_regs)
{ {
bcopy (&deprecated_registers[REGISTER_BYTE (G0_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G0_REGNUM)],
&sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE); &sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (Y_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)],
&sparc_greg_packet[SPARC_R_Y], 6 * SPARC_GREG_SIZE); &sparc_greg_packet[SPARC_R_Y], 6 * SPARC_GREG_SIZE);
net_write_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_SETREGS); net_write_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_SETREGS);
@ -176,9 +176,9 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM)) if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{ {
sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)], sp = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM)); REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)], write_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)); 16 * REGISTER_RAW_SIZE (L0_REGNUM));
} }
} }
@ -187,9 +187,9 @@ vx_write_register (int regno)
if (in_fp_regs && target_has_fp) if (in_fp_regs && target_has_fp)
{ {
bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE); &sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE);
bcopy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FSR], 1 * SPARC_FPREG_SIZE); &sparc_fpreg_packet[SPARC_R_FSR], 1 * SPARC_FPREG_SIZE);
net_write_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN, net_write_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,

View File

@ -271,7 +271,7 @@ init_remote_state (struct gdbarch *gdbarch)
struct packet_reg *r = &rs->regs[regnum]; struct packet_reg *r = &rs->regs[regnum];
r->pnum = regnum; r->pnum = regnum;
r->regnum = regnum; r->regnum = regnum;
r->offset = REGISTER_BYTE (regnum); r->offset = DEPRECATED_REGISTER_BYTE (regnum);
r->in_g_packet = (regnum < NUM_REGS); r->in_g_packet = (regnum < NUM_REGS);
/* ...name = REGISTER_NAME (regnum); */ /* ...name = REGISTER_NAME (regnum); */

View File

@ -1054,7 +1054,7 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.gpr_offset; addr = prev_sp + fdata.gpr_offset;
for (ii = fdata.saved_gpr; ii <= 31; ++ii) for (ii = fdata.saved_gpr; ii <= 31; ++ii)
{ {
read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii)], read_memory (addr, &deprecated_registers[DEPRECATED_REGISTER_BYTE (ii)],
wordsize); wordsize);
addr += wordsize; addr += wordsize;
} }
@ -1065,7 +1065,7 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.fpr_offset; addr = prev_sp + fdata.fpr_offset;
for (ii = fdata.saved_fpr; ii <= 31; ++ii) for (ii = fdata.saved_fpr; ii <= 31; ++ii)
{ {
read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8); read_memory (addr, &deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + FP0_REGNUM)], 8);
addr += 8; addr += 8;
} }
} }
@ -1171,7 +1171,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
printf_unfiltered ( printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno); "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg), VALUE_CONTENTS (arg),
len); len);
++f_argno; ++f_argno;
@ -1183,9 +1183,9 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Argument takes more than one register. */ /* Argument takes more than one register. */
while (argbytes < len) while (argbytes < len)
{ {
memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0, memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + 3)], 0,
reg_size); reg_size);
memcpy (&deprecated_registers[REGISTER_BYTE (ii + 3)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + 3)],
((char *) VALUE_CONTENTS (arg)) + argbytes, ((char *) VALUE_CONTENTS (arg)) + argbytes,
(len - argbytes) > reg_size (len - argbytes) > reg_size
? reg_size : len - argbytes); ? reg_size : len - argbytes);
@ -1201,8 +1201,8 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{ {
/* Argument can fit in one register. No problem. */ /* Argument can fit in one register. No problem. */
int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0; int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0, reg_size); memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + 3)], 0, reg_size);
memcpy ((char *)&deprecated_registers[REGISTER_BYTE (ii + 3)] + adj, memcpy ((char *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + 3)] + adj,
VALUE_CONTENTS (arg), len); VALUE_CONTENTS (arg), len);
} }
++argno; ++argno;
@ -1276,7 +1276,7 @@ ran_out_of_registers_for_arguments:
printf_unfiltered ( printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno); "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg), VALUE_CONTENTS (arg),
len); len);
++f_argno; ++f_argno;
@ -1401,11 +1401,11 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
if (TYPE_LENGTH (valtype) > 4) /* this is a double */ if (TYPE_LENGTH (valtype) > 4) /* this is a double */
memcpy (valbuf, memcpy (valbuf,
&regbuf[REGISTER_BYTE (FP0_REGNUM + 1)], &regbuf[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1)],
TYPE_LENGTH (valtype)); TYPE_LENGTH (valtype));
else else
{ /* float */ { /* float */
memcpy (&dd, &regbuf[REGISTER_BYTE (FP0_REGNUM + 1)], 8); memcpy (&dd, &regbuf[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1)], 8);
ff = (float) dd; ff = (float) dd;
memcpy (valbuf, &ff, sizeof (float)); memcpy (valbuf, &ff, sizeof (float));
} }
@ -1414,7 +1414,7 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
&& TYPE_LENGTH (valtype) == 16 && TYPE_LENGTH (valtype) == 16
&& TYPE_VECTOR (valtype)) && TYPE_VECTOR (valtype))
{ {
memcpy (valbuf, regbuf + REGISTER_BYTE (tdep->ppc_vr0_regnum + 2), memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
TYPE_LENGTH (valtype)); TYPE_LENGTH (valtype));
} }
else else
@ -1425,7 +1425,7 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
offset = REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype); offset = REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype);
memcpy (valbuf, memcpy (valbuf,
regbuf + REGISTER_BYTE (3) + offset, regbuf + DEPRECATED_REGISTER_BYTE (3) + offset,
TYPE_LENGTH (valtype)); TYPE_LENGTH (valtype));
} }
} }
@ -2081,18 +2081,18 @@ rs6000_store_return_value (struct type *type, char *valbuf)
Say a double_double_double type could be returned in Say a double_double_double type could be returned in
FPR1/FPR2/FPR3 triple. */ FPR1/FPR2/FPR3 triple. */
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY) else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{ {
if (TYPE_LENGTH (type) == 16 if (TYPE_LENGTH (type) == 16
&& TYPE_VECTOR (type)) && TYPE_VECTOR (type))
deprecated_write_register_bytes (REGISTER_BYTE (tdep->ppc_vr0_regnum + 2), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
} }
else else
/* Everything else is returned in GPR3 and up. */ /* Everything else is returned in GPR3 and up. */
deprecated_write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
} }

View File

@ -903,7 +903,7 @@ s390_get_signal_frame_info (struct frame_info *fi)
/* We're definitely backtracing from a signal handler. */ /* We're definitely backtracing from a signal handler. */
CORE_ADDR *saved_regs = get_frame_saved_regs (fi); CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
CORE_ADDR save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext CORE_ADDR save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext
+ REGISTER_BYTE (S390_GP0_REGNUM)); + DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM));
int reg; int reg;
for (reg = 0; reg < S390_NUM_GPRS; reg++) for (reg = 0; reg < S390_NUM_GPRS; reg++)
@ -1662,8 +1662,7 @@ s390_is_sigreturn (CORE_ADDR pc, struct frame_info *sighandler_fi,
*sigcaller_pc = *sigcaller_pc =
ADDR_BITS_REMOVE ((CORE_ADDR) ADDR_BITS_REMOVE ((CORE_ADDR)
read_memory_integer (temp_sregs + read_memory_integer (temp_sregs +
REGISTER_BYTE DEPRECATED_REGISTER_BYTE (S390_PC_REGNUM),
(S390_PC_REGNUM),
S390_PSW_ADDR_SIZE)); S390_PSW_ADDR_SIZE));
} }
} }
@ -1833,7 +1832,7 @@ s390_frame_chain (struct frame_info *thisframe)
{ {
/* read sigregs,regs.gprs[11 or 15] */ /* read sigregs,regs.gprs[11 or 15] */
prev_fp = read_memory_integer (sregs + prev_fp = read_memory_integer (sregs +
REGISTER_BYTE (S390_GP0_REGNUM + DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM +
(prev_fextra_info. (prev_fextra_info.
frame_pointer_saved_pc frame_pointer_saved_pc
? 11 : 15)), ? 11 : 15)),
@ -1886,7 +1885,7 @@ s390_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
int len = TYPE_LENGTH (valtype); int len = TYPE_LENGTH (valtype);
if (TYPE_CODE (valtype) == TYPE_CODE_FLT) if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
memcpy (valbuf, &regbuf[REGISTER_BYTE (S390_FP0_REGNUM)], len); memcpy (valbuf, &regbuf[DEPRECATED_REGISTER_BYTE (S390_FP0_REGNUM)], len);
else else
{ {
int offset = 0; int offset = 0;
@ -1894,7 +1893,7 @@ s390_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
if (TYPE_LENGTH (valtype) < S390_GPR_SIZE) if (TYPE_LENGTH (valtype) < S390_GPR_SIZE)
offset = S390_GPR_SIZE - TYPE_LENGTH (valtype); offset = S390_GPR_SIZE - TYPE_LENGTH (valtype);
memcpy (valbuf, memcpy (valbuf,
regbuf + REGISTER_BYTE (S390_GP0_REGNUM + 2) + offset, regbuf + DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM + 2) + offset,
TYPE_LENGTH (valtype)); TYPE_LENGTH (valtype));
} }
} }
@ -1945,7 +1944,7 @@ s390_store_return_value (struct type *valtype, char *valbuf)
{ {
if (TYPE_LENGTH (valtype) == 4 if (TYPE_LENGTH (valtype) == 4
|| TYPE_LENGTH (valtype) == 8) || TYPE_LENGTH (valtype) == 8)
deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (S390_FP0_REGNUM),
valbuf, TYPE_LENGTH (valtype)); valbuf, TYPE_LENGTH (valtype));
else else
error ("GDB is unable to return `long double' values " error ("GDB is unable to return `long double' values "
@ -1956,7 +1955,7 @@ s390_store_return_value (struct type *valtype, char *valbuf)
value = value =
s390_promote_integer_argument (valtype, valbuf, reg_buff, &arglen); s390_promote_integer_argument (valtype, valbuf, reg_buff, &arglen);
/* Everything else is returned in GPR2 and up. */ /* Everything else is returned in GPR2 and up. */
deprecated_write_register_bytes (REGISTER_BYTE (S390_GP0_REGNUM + 2), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM + 2),
value, arglen); value, arglen);
} }
} }
@ -2363,7 +2362,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{ {
/* When we store a single-precision value in an FP register, /* When we store a single-precision value in an FP register,
it occupies the leftmost bits. */ it occupies the leftmost bits. */
deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM + fr), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (S390_FP0_REGNUM + fr),
VALUE_CONTENTS (arg), VALUE_CONTENTS (arg),
TYPE_LENGTH (type)); TYPE_LENGTH (type));
fr += 2; fr += 2;

View File

@ -1292,7 +1292,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (raw_buffer) if (raw_buffer)
memcpy (raw_buffer, memcpy (raw_buffer,
(deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame)) (deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
+ REGISTER_BYTE (regnum)), + DEPRECATED_REGISTER_BYTE (regnum)),
REGISTER_RAW_SIZE (regnum)); REGISTER_RAW_SIZE (regnum));
return; return;
} }
@ -1343,7 +1343,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (lval) /* found it in a live register */ if (lval) /* found it in a live register */
*lval = lval_register; *lval = lval_register;
if (addrp) if (addrp)
*addrp = REGISTER_BYTE (live_regnum); *addrp = DEPRECATED_REGISTER_BYTE (live_regnum);
if (raw_buffer) if (raw_buffer)
deprecated_read_register_gen (live_regnum, raw_buffer); deprecated_read_register_gen (live_regnum, raw_buffer);
} }
@ -1351,7 +1351,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
static CORE_ADDR static CORE_ADDR
sh64_extract_struct_value_address (char *regbuf) sh64_extract_struct_value_address (char *regbuf)
{ {
return (extract_unsigned_integer ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)), return (extract_unsigned_integer ((regbuf + DEPRECATED_REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM))); REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
} }
@ -1673,7 +1673,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{ {
/* Return value stored in FP0_REGNUM */ /* Return value stored in FP0_REGNUM */
return_register = FP0_REGNUM; return_register = FP0_REGNUM;
offset = REGISTER_BYTE (return_register); offset = DEPRECATED_REGISTER_BYTE (return_register);
memcpy (valbuf, (char *) regbuf + offset, len); memcpy (valbuf, (char *) regbuf + offset, len);
} }
else if (len == 8) else if (len == 8)
@ -1682,7 +1682,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
DOUBLEST val; DOUBLEST val;
return_register = DR0_REGNUM; return_register = DR0_REGNUM;
offset = REGISTER_BYTE (return_register); offset = DEPRECATED_REGISTER_BYTE (return_register);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE) if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
@ -1701,10 +1701,10 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
at the most significant end. */ at the most significant end. */
return_register = DEFAULT_RETURN_REGNUM; return_register = DEFAULT_RETURN_REGNUM;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_BYTE (return_register) + offset = DEPRECATED_REGISTER_BYTE (return_register) +
REGISTER_RAW_SIZE (return_register) - len; REGISTER_RAW_SIZE (return_register) - len;
else else
offset = REGISTER_BYTE (return_register); offset = DEPRECATED_REGISTER_BYTE (return_register);
memcpy (valbuf, (char *) regbuf + offset, len); memcpy (valbuf, (char *) regbuf + offset, len);
} }
else else

View File

@ -101,16 +101,16 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_registers, 0)) (PTRACE_ARG3_TYPE) & inferior_registers, 0))
perror ("ptrace_getregs"); perror ("ptrace_getregs");
deprecated_registers[REGISTER_BYTE (0)] = 0; deprecated_registers[DEPRECATED_REGISTER_BYTE (0)] = 0;
memcpy (&deprecated_registers[REGISTER_BYTE (1)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (1)],
&inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM)); &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
*(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)]
= inferior_registers.r_ps; = inferior_registers.r_ps;
*(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
= inferior_registers.r_pc; = inferior_registers.r_pc;
*(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)] *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)]
= inferior_registers.r_npc; = inferior_registers.r_npc;
*(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
for (i = G0_REGNUM; i <= O7_REGNUM; i++) for (i = G0_REGNUM; i <= O7_REGNUM; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -134,9 +134,9 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_fp_registers, (PTRACE_ARG3_TYPE) & inferior_fp_registers,
0)) 0))
perror ("ptrace_getfpregs"); perror ("ptrace_getfpregs");
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&inferior_fp_registers, sizeof inferior_fp_registers.fpu_fr); &inferior_fp_registers, sizeof inferior_fp_registers.fpu_fr);
memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
&inferior_fp_registers.Fpu_fsr, sizeof (FPU_FSR_TYPE)); &inferior_fp_registers.Fpu_fsr, sizeof (FPU_FSR_TYPE));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++) for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
@ -147,19 +147,19 @@ fetch_inferior_registers (int regno)
all (16 ptrace calls!) if we really need them. */ all (16 ptrace calls!) if we really need them. */
if (regno == -1) if (regno == -1)
{ {
CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)]; CORE_ADDR sp = *(unsigned int *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
target_read_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)], target_read_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)); 16 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= I7_REGNUM; i++) for (i = L0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1; deprecated_register_valid[i] = 1;
} }
else if (regno >= L0_REGNUM && regno <= I7_REGNUM) else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
{ {
CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)]; CORE_ADDR sp = *(unsigned int *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
i = REGISTER_BYTE (regno); i = DEPRECATED_REGISTER_BYTE (regno);
if (deprecated_register_valid[regno]) if (deprecated_register_valid[regno])
printf_unfiltered ("register %d valid and read\n", regno); printf_unfiltered ("register %d valid and read\n", regno);
target_read_memory (sp + i - REGISTER_BYTE (L0_REGNUM), target_read_memory (sp + i - DEPRECATED_REGISTER_BYTE (L0_REGNUM),
&deprecated_registers[i], REGISTER_RAW_SIZE (regno)); &deprecated_registers[i], REGISTER_RAW_SIZE (regno));
deprecated_register_valid[regno] = 1; deprecated_register_valid[regno] = 1;
} }
@ -226,22 +226,22 @@ store_inferior_registers (int regno)
if (wanna_store & STACK_REGS) if (wanna_store & STACK_REGS)
{ {
CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)]; CORE_ADDR sp = *(unsigned int *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
if (regno < 0 || regno == SP_REGNUM) if (regno < 0 || regno == SP_REGNUM)
{ {
if (!deprecated_register_valid[L0_REGNUM + 5]) if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp, target_write_memory (sp,
&deprecated_registers[REGISTER_BYTE (L0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)); 16 * REGISTER_RAW_SIZE (L0_REGNUM));
} }
else else
{ {
if (!deprecated_register_valid[regno]) if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM), target_write_memory (sp + DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (L0_REGNUM),
&deprecated_registers[REGISTER_BYTE (regno)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
} }
@ -253,17 +253,17 @@ store_inferior_registers (int regno)
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
memcpy (&inferior_registers.r_g1, memcpy (&inferior_registers.r_g1,
&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
15 * REGISTER_RAW_SIZE (G1_REGNUM)); 15 * REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps = inferior_registers.r_ps =
*(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc = inferior_registers.r_pc =
*(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
inferior_registers.r_npc = inferior_registers.r_npc =
*(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)]; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)];
inferior_registers.r_y = inferior_registers.r_y =
*(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)]; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)];
if (0 != ptrace (PTRACE_SETREGS, store_pid, if (0 != ptrace (PTRACE_SETREGS, store_pid,
(PTRACE_ARG3_TYPE) & inferior_registers, 0)) (PTRACE_ARG3_TYPE) & inferior_registers, 0))
@ -275,10 +275,10 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[FP0_REGNUM + 9]) if (!deprecated_register_valid[FP0_REGNUM + 9])
internal_error (__FILE__, __LINE__, "failed internal consistency check"); internal_error (__FILE__, __LINE__, "failed internal consistency check");
memcpy (&inferior_fp_registers, memcpy (&inferior_fp_registers,
&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fpu_fr); sizeof inferior_fp_registers.fpu_fr);
memcpy (&inferior_fp_registers.Fpu_fsr, memcpy (&inferior_fp_registers.Fpu_fsr,
&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
sizeof (FPU_FSR_TYPE)); sizeof (FPU_FSR_TYPE));
if (0 != if (0 !=
ptrace (PTRACE_SETFPREGS, store_pid, ptrace (PTRACE_SETFPREGS, store_pid,
@ -311,15 +311,15 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define gregs ((struct regs *)core_reg_sect) #define gregs ((struct regs *)core_reg_sect)
/* G0 *always* holds 0. */ /* G0 *always* holds 0. */
*(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */ /* The globals and output registers. */
memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1, memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
15 * REGISTER_RAW_SIZE (G1_REGNUM)); 15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
*(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
*(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
/* My best guess at where to get the locals and input /* My best guess at where to get the locals and input
registers is exactly where they usually are, right above registers is exactly where they usually are, right above
@ -329,9 +329,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{ {
int sp; int sp;
sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)]; sp = *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp, if (0 != target_read_memory (sp,
&deprecated_registers[REGISTER_BYTE (L0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM))) 16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{ {
/* fprintf_unfiltered so user can still use gdb */ /* fprintf_unfiltered so user can still use gdb */
@ -348,9 +348,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define fpuregs ((struct fpu *) core_reg_sect) #define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu)) if (core_reg_size >= sizeof (struct fpu))
{ {
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
fpuregs->fpu_regs, sizeof (fpuregs->fpu_regs)); fpuregs->fpu_regs, sizeof (fpuregs->fpu_regs));
memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
&fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE)); &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
} }
else else

View File

@ -936,7 +936,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{ {
if (lval != NULL) if (lval != NULL)
*lval = lval_register; *lval = lval_register;
addr = REGISTER_BYTE (regnum); addr = DEPRECATED_REGISTER_BYTE (regnum);
if (raw_buffer != NULL) if (raw_buffer != NULL)
deprecated_read_register_gen (regnum, raw_buffer); deprecated_read_register_gen (regnum, raw_buffer);
} }
@ -972,10 +972,10 @@ sparc_push_dummy_frame (void)
if (GDB_TARGET_IS_SPARC64) if (GDB_TARGET_IS_SPARC64)
{ {
/* PC, NPC, CCR, FSR, FPRS, Y, ASI */ /* PC, NPC, CCR, FSR, FPRS, Y, ASI */
deprecated_read_register_bytes (REGISTER_BYTE (PC_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (PC_REGNUM),
&register_temp[0], &register_temp[0],
REGISTER_RAW_SIZE (PC_REGNUM) * 7); REGISTER_RAW_SIZE (PC_REGNUM) * 7);
deprecated_read_register_bytes (REGISTER_BYTE (PSTATE_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (PSTATE_REGNUM),
&register_temp[7 * SPARC_INTREG_SIZE], &register_temp[7 * SPARC_INTREG_SIZE],
REGISTER_RAW_SIZE (PSTATE_REGNUM)); REGISTER_RAW_SIZE (PSTATE_REGNUM));
/* FIXME: not sure what needs to be saved here. */ /* FIXME: not sure what needs to be saved here. */
@ -983,21 +983,21 @@ sparc_push_dummy_frame (void)
else else
{ {
/* Y, PS, WIM, TBR, PC, NPC, FPS, CPS regs */ /* Y, PS, WIM, TBR, PC, NPC, FPS, CPS regs */
deprecated_read_register_bytes (REGISTER_BYTE (Y_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (Y_REGNUM),
&register_temp[0], &register_temp[0],
REGISTER_RAW_SIZE (Y_REGNUM) * 8); REGISTER_RAW_SIZE (Y_REGNUM) * 8);
} }
deprecated_read_register_bytes (REGISTER_BYTE (O0_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (O0_REGNUM),
&register_temp[8 * SPARC_INTREG_SIZE], &register_temp[8 * SPARC_INTREG_SIZE],
SPARC_INTREG_SIZE * 8); SPARC_INTREG_SIZE * 8);
deprecated_read_register_bytes (REGISTER_BYTE (G0_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (G0_REGNUM),
&register_temp[16 * SPARC_INTREG_SIZE], &register_temp[16 * SPARC_INTREG_SIZE],
SPARC_INTREG_SIZE * 8); SPARC_INTREG_SIZE * 8);
if (SPARC_HAS_FPU) if (SPARC_HAS_FPU)
deprecated_read_register_bytes (REGISTER_BYTE (FP0_REGNUM), deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM),
&register_temp[24 * SPARC_INTREG_SIZE], &register_temp[24 * SPARC_INTREG_SIZE],
FP_REGISTER_BYTES); FP_REGISTER_BYTES);
@ -1224,7 +1224,7 @@ sparc_pop_frame (void)
if (fsr[FP0_REGNUM]) if (fsr[FP0_REGNUM])
{ {
read_memory (fsr[FP0_REGNUM], raw_buffer, FP_REGISTER_BYTES); read_memory (fsr[FP0_REGNUM], raw_buffer, FP_REGISTER_BYTES);
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM),
raw_buffer, FP_REGISTER_BYTES); raw_buffer, FP_REGISTER_BYTES);
} }
if (!(GDB_TARGET_IS_SPARC64)) if (!(GDB_TARGET_IS_SPARC64))
@ -1244,7 +1244,7 @@ sparc_pop_frame (void)
if (fsr[G1_REGNUM]) if (fsr[G1_REGNUM])
{ {
read_memory (fsr[G1_REGNUM], raw_buffer, 7 * SPARC_INTREG_SIZE); read_memory (fsr[G1_REGNUM], raw_buffer, 7 * SPARC_INTREG_SIZE);
deprecated_write_register_bytes (REGISTER_BYTE (G1_REGNUM), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (G1_REGNUM), raw_buffer,
7 * SPARC_INTREG_SIZE); 7 * SPARC_INTREG_SIZE);
} }
@ -1297,10 +1297,10 @@ sparc_pop_frame (void)
/* Restore the out registers. /* Restore the out registers.
Among other things this writes the new stack pointer. */ Among other things this writes the new stack pointer. */
deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), raw_buffer, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (O0_REGNUM), raw_buffer,
SPARC_INTREG_SIZE * 8); SPARC_INTREG_SIZE * 8);
deprecated_write_register_bytes (REGISTER_BYTE (L0_REGNUM), reg_temp, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (L0_REGNUM), reg_temp,
SPARC_INTREG_SIZE * 16); SPARC_INTREG_SIZE * 16);
} }
@ -1711,7 +1711,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{ {
if ((regno == -1) || (regno == regi)) if ((regno == -1) || (regno == regi))
{ {
from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &fpregsetp->pr_fr.pr_regs[regi - FP0_REGNUM]; to = (char *) &fpregsetp->pr_fr.pr_regs[regi - FP0_REGNUM];
memcpy (to, from, REGISTER_RAW_SIZE (regi)); memcpy (to, from, REGISTER_RAW_SIZE (regi));
} }
@ -1720,7 +1720,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
if (!(GDB_TARGET_IS_SPARC64)) /* FIXME: does Sparc64 have this register? */ if (!(GDB_TARGET_IS_SPARC64)) /* FIXME: does Sparc64 have this register? */
if ((regno == -1) || (regno == FPS_REGNUM)) if ((regno == -1) || (regno == FPS_REGNUM))
{ {
from = (char *)&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)]; from = (char *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)];
to = (char *) &fpregsetp->pr_fsr; to = (char *) &fpregsetp->pr_fsr;
memcpy (to, from, REGISTER_RAW_SIZE (FPS_REGNUM)); memcpy (to, from, REGISTER_RAW_SIZE (FPS_REGNUM));
} }
@ -2416,7 +2416,7 @@ sparc_store_return_value (struct type *type, char *valbuf)
deprecated_write_register_gen (regno, buffer); deprecated_write_register_gen (regno, buffer);
} }
else else
deprecated_write_register_bytes (REGISTER_BYTE (regno), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regno), valbuf,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }
@ -2693,7 +2693,7 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
default: default:
internal_error (__FILE__, __LINE__, "bad switch"); internal_error (__FILE__, __LINE__, "bad switch");
} }
deprecated_write_register_bytes (REGISTER_BYTE (fpreg), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (fpreg),
VALUE_CONTENTS (args[i]), VALUE_CONTENTS (args[i]),
len); len);
} }
@ -2726,7 +2726,7 @@ sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU) if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU)
{ {
memcpy (valbuf, &regbuf[REGISTER_BYTE (FP0_REGNUM)], typelen); memcpy (valbuf, &regbuf[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], typelen);
return; return;
} }

View File

@ -47,13 +47,13 @@ fetch_inferior_registers (int regno)
memcpy (deprecated_registers, &inferior_registers, 16 * 4); memcpy (deprecated_registers, &inferior_registers, 16 * 4);
if (FP0_REGNUM >= 0) if (FP0_REGNUM >= 0)
memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&inferior_fp_registers, sizeof inferior_fp_registers.fps_regs); &inferior_fp_registers, sizeof inferior_fp_registers.fps_regs);
*(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
*(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc; *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
if (FP0_REGNUM >= 0) if (FP0_REGNUM >= 0)
memcpy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
&inferior_fp_registers.fps_control, &inferior_fp_registers.fps_control,
sizeof inferior_fp_registers - sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs); sizeof inferior_fp_registers.fps_regs);
@ -72,15 +72,15 @@ store_inferior_registers (int regno)
memcpy (&inferior_registers, deprecated_registers, 16 * 4); memcpy (&inferior_registers, deprecated_registers, 16 * 4);
if (FP0_REGNUM >= 0) if (FP0_REGNUM >= 0)
memcpy (&inferior_fp_registers, memcpy (&inferior_fp_registers,
&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fps_regs); sizeof inferior_fp_registers.fps_regs);
inferior_registers.r_ps = *(int *) &&deprecated_registers[REGISTER_BYTE (PS_REGNUM)]; inferior_registers.r_ps = *(int *) &&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc = *(int *) &&deprecated_registers[REGISTER_BYTE (PC_REGNUM)]; inferior_registers.r_pc = *(int *) &&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
if (FP0_REGNUM >= 0) if (FP0_REGNUM >= 0)
memcpy (&inferior_fp_registers.fps_control, memcpy (&inferior_fp_registers.fps_control,
&&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], &&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
sizeof inferior_fp_registers - sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs); sizeof inferior_fp_registers.fps_regs);
@ -131,10 +131,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{ {
if (FP0_REGNUM >= 0) if (FP0_REGNUM >= 0)
{ {
memcpy (&&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
fpustruct->f_fpstatus.fps_regs, fpustruct->f_fpstatus.fps_regs,
sizeof fpustruct->f_fpstatus.fps_regs); sizeof fpustruct->f_fpstatus.fps_regs);
memcpy (&&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)], memcpy (&&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
&fpustruct->f_fpstatus.fps_control, &fpustruct->f_fpstatus.fps_control,
sizeof fpustruct->f_fpstatus - sizeof fpustruct->f_fpstatus -
sizeof fpustruct->f_fpstatus.fps_regs); sizeof fpustruct->f_fpstatus.fps_regs);

View File

@ -1065,7 +1065,7 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Scalar return values of <= 8 bytes are returned in /* Scalar return values of <= 8 bytes are returned in
E_V0_REGNUM to E_V1_REGNUM. */ E_V0_REGNUM to E_V1_REGNUM. */
memcpy (valbuf, memcpy (valbuf,
&regbuf[REGISTER_BYTE (E_V0_REGNUM)], &regbuf[DEPRECATED_REGISTER_BYTE (E_V0_REGNUM)],
TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }
else else
@ -1073,7 +1073,7 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 8 bytes are returned in memory, /* Aggregates and return values > 8 bytes are returned in memory,
pointed to by R6. */ pointed to by R6. */
return_buffer = return_buffer =
extract_unsigned_integer (regbuf + REGISTER_BYTE (E_V0_REGNUM), extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (E_V0_REGNUM),
REGISTER_RAW_SIZE (E_V0_REGNUM)); REGISTER_RAW_SIZE (E_V0_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type)); read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
@ -1101,7 +1101,7 @@ v850_store_return_value (struct type *type, char *valbuf)
CORE_ADDR return_buffer; CORE_ADDR return_buffer;
if (!v850_use_struct_convention (0, type)) if (!v850_use_struct_convention (0, type))
deprecated_write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf, deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (E_V0_REGNUM), valbuf,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
else else
{ {

View File

@ -560,7 +560,7 @@ v850ice_store_registers (int regno)
return; return;
} }
regval = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)], regval = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
strcpy (cmd, "reg "); strcpy (cmd, "reg ");
if (!convert_register (regno, &cmd[4])) if (!convert_register (regno, &cmd[4]))

View File

@ -267,7 +267,7 @@ vax_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
static void static void
vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf) vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
{ {
memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (valtype)); memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (0), TYPE_LENGTH (valtype));
} }
static void static void
@ -279,7 +279,7 @@ vax_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR static CORE_ADDR
vax_extract_struct_value_address (char *regbuf) vax_extract_struct_value_address (char *regbuf)
{ {
return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0), return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0),
REGISTER_RAW_SIZE (0))); REGISTER_RAW_SIZE (0)));
} }

View File

@ -221,7 +221,7 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Scalar return values of <= 12 bytes are returned in /* Scalar return values of <= 12 bytes are returned in
E_1ST_ARG_REGNUM to E_LST_ARG_REGNUM. */ E_1ST_ARG_REGNUM to E_LST_ARG_REGNUM. */
memcpy (valbuf, memcpy (valbuf,
&regbuf[REGISTER_BYTE (E_1ST_ARG_REGNUM)] + offset, &regbuf[DEPRECATED_REGISTER_BYTE (E_1ST_ARG_REGNUM)] + offset,
TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }
else else
@ -229,7 +229,7 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 12 bytes are returned in memory, /* Aggregates and return values > 12 bytes are returned in memory,
pointed to by R2. */ pointed to by R2. */
return_buffer = return_buffer =
extract_unsigned_integer (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM), extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (E_PTR_RET_REGNUM),
REGISTER_RAW_SIZE (E_PTR_RET_REGNUM)); REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type)); read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
@ -393,7 +393,7 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
} }
else if (xstormy16_type_is_scalar (type) && else if (xstormy16_type_is_scalar (type) &&
TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS) TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS)
deprecated_write_register_bytes (REGISTER_BYTE (E_1ST_ARG_REGNUM), deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (E_1ST_ARG_REGNUM),
valbuf, TYPE_LENGTH (type)); valbuf, TYPE_LENGTH (type));
else else
{ {