+2002-08-12 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.h (i386_register_byte, i386_register_raw_size): Delete
+ declarations.
+ * i386-linux-tdep.c (i386_linux_register_byte): Delete function.
+ (i386_linux_register_raw_size): Delete function.
+ (i386_linux_init_abi): Update.
+ * i386-tdep.c (i386_register_raw_size): Delete function.
+ (i386_register_byte): Delete function.
+ (i386_gdbarch_init): Update.
+ (i386_register_size): Delete array.
+ (i386_register_offset): Delete array.
+
+ * config/i386/tm-symmetry.h (REGISTER_BYTE): Delete macro.
+ (REGISTER_RAW_SIZE): Delete macro.
+ * config/i386/tm-ptx.h (REGISTER_RAW_SIZE): Delete macro.
+ (REGISTER_BYTE): Delete macro.
+
2002-08-11 Aidan Skinner <aidan@velvet.net>
* ada-lang.c (ada_lookup_partial_symbol)
* ada-valprint.c (val_print_packed_array_elements) (ada_val_print_1):
Fix prototype names so that grep ^func works properly.
-
2002-08-10 Andrew Cagney <cagney@redhat.com>
Elena Zannoni <ezannoni@redhat.com>
Martin M. Hunt <hunt@redhat.com>
#undef REGISTER_BYTES
#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-/* Index within `registers' of the first byte of the space for register N. */
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(N) \
-(((N) < ST0_REGNUM) ? ((N) * 4) : \
- ((N) < FP1_REGNUM) ? (40 + (((N) - ST0_REGNUM) * 10)) : \
- (40 + 80 + (((N) - FP1_REGNUM) * 4)))
-
-/* Number of bytes of storage in the actual machine representation for
- register N. All registers are 4 bytes, except 387 st(0) - st(7),
- which are 80 bits each. */
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) \
-(((N) < ST0_REGNUM) ? 4 : \
- ((N) < FP1_REGNUM) ? 10 : \
- 4)
-
/* Largest value REGISTER_RAW_SIZE can have. */
#undef MAX_REGISTER_RAW_SIZE
#undef REGISTER_BYTES
#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(N) \
-(((N) < 3) ? ((N) * 4) : \
-((N) < 5) ? ((((N) - 2) * 10) + 2) : \
-((N) < 8) ? ((((N) - 5) * 4) + 32) : \
-((N) < 14) ? ((((N) - 8) * 10) + 44) : \
- ((((N) - 14) * 4) + 104))
-
-/* Number of bytes of storage in the actual machine representation
- * for register N. All registers are 4 bytes, except 387 st(0) - st(7),
- * which are 80 bits each.
- */
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) \
-(((N) < 3) ? 4 : \
-((N) < 5) ? 10 : \
-((N) < 8) ? 4 : \
-((N) < 14) ? 10 : \
- 4)
-
/* Nonzero if register N requires conversion
from raw format to virtual format. */
return i386_register_name (reg);
}
-
-static int
-i386_linux_register_byte (int reg)
-{
- /* Deal with the extra "orig_eax" pseudo register. */
- if (reg == I386_LINUX_ORIG_EAX_REGNUM)
- return (i386_register_byte (I386_LINUX_ORIG_EAX_REGNUM - 1)
- + i386_register_raw_size (I386_LINUX_ORIG_EAX_REGNUM - 1));
-
- return i386_register_byte (reg);
-}
-
-static int
-i386_linux_register_raw_size (int reg)
-{
- /* Deal with the extra "orig_eax" pseudo register. */
- if (reg == I386_LINUX_ORIG_EAX_REGNUM)
- return 4;
-
- return i386_register_raw_size (reg);
-}
\f
/* Recognizing signal handler frames. */
set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
set_gdbarch_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
- set_gdbarch_register_byte (gdbarch, i386_linux_register_byte);
- set_gdbarch_register_raw_size (gdbarch, i386_linux_register_raw_size);
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
"mxcsr"
};
-/* i386_register_offset[i] is the offset into the register file of the
- start of register number i. We initialize this from
- i386_register_size. */
-static int i386_register_offset[I386_SSE_NUM_REGS];
-
-/* i386_register_size[i] is the number of bytes of storage in GDB's
- register array occupied by register i. */
-static int i386_register_size[I386_SSE_NUM_REGS] = {
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 10, 10, 10, 10,
- 10, 10, 10, 10,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 16, 16, 16, 16,
- 16, 16, 16, 16,
- 4
-};
-
/* Return the name of register REG. */
const char *
return i386_register_names[reg];
}
-/* Return the offset into the register array of the start of register
- number REG. */
-int
-i386_register_byte (int reg)
-{
- return i386_register_offset[reg];
-}
-
-/* Return the number of bytes of storage in GDB's register array
- occupied by register REG. */
-
-int
-i386_register_raw_size (int reg)
-{
- return i386_register_size[reg];
-}
-
/* Convert stabs register number REG to the appropriate register
number used by GDB. */
set_gdbarch_register_name (gdbarch, i386_register_name);
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_register_byte (gdbarch, i386_register_byte);
- set_gdbarch_register_raw_size (gdbarch, i386_register_raw_size);
set_gdbarch_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
set_gdbarch_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
{
register_gdbarch_init (bfd_arch_i386, i386_gdbarch_init);
- /* Initialize the table saying where each register starts in the
- register file. */
- {
- int i, offset;
-
- offset = 0;
- for (i = 0; i < I386_SSE_NUM_REGS; i++)
- {
- i386_register_offset[i] = offset;
- offset += i386_register_size[i];
- }
- }
-
tm_print_insn = gdb_print_insn_i386;
tm_print_insn_info.mach = bfd_lookup_arch (bfd_arch_i386, 0)->mach;
/* Return the name of register REG. */
extern char const *i386_register_name (int reg);
-/* Return the offset into the register array of the start of register
- number REG. */
-extern int i386_register_byte (int reg);
-
-/* Return the number of bytes of storage in GDB's register array
- occupied by register REG. */
-extern int i386_register_raw_size (int reg);
-
/* Initialize a basic ELF architecture variant. */
extern void i386_elf_init_abi (struct gdbarch_info, struct gdbarch *);