mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 18:41:27 +00:00
* defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
define TARGET_BYTE_ORDER as target_byte_order, and declare target_byte_order as an extern int, and define BITS_BIG_ENDIAN as a test of TARGET_BYTE_ORDER. * top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is defined: (endianlist, target_byte_order): New variables. (set_endian, set_endian_big, set_endian_little): New functions. (show_endian): New function. (init_cmd_lists): Initialize endianlist. (init_main): Add commands ``set endian big'', ``set endian little'', and ``show endian''. * a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and BITS_BIG_ENDIAN to switch at run time rather than at compile time. * coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise. * remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise. * values.c: Likewise. * mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at run time rather than at compile time.
This commit is contained in:
@@ -270,13 +270,11 @@ get_hex_regs (n, regno)
|
||||
val = 0;
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
#if TARGET_BYTE_ORDER == BIG_ENDIAN
|
||||
get_hex_byte(&b);
|
||||
val = (val << 8) + b;
|
||||
#else
|
||||
get_hex_byte(&b);
|
||||
val = val + (b << (j*8));
|
||||
#endif
|
||||
get_hex_byte (&b);
|
||||
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||
val = (val << 8) + b;
|
||||
else
|
||||
val = val + (b << (j*8));
|
||||
}
|
||||
supply_register (regno++, (char *) &val);
|
||||
}
|
||||
@@ -577,13 +575,11 @@ rombug_fetch_registers ()
|
||||
val = 0;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
#if TARGET_BYTE_ORDER == BIG_ENDIAN
|
||||
get_hex_byte(&b);
|
||||
val = (val << 8) + b;
|
||||
#else
|
||||
get_hex_byte(&b);
|
||||
val = val + (b << (j*8));
|
||||
#endif
|
||||
get_hex_byte (&b);
|
||||
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||
val = (val << 8) + b;
|
||||
else
|
||||
val = val + (b << (j*8));
|
||||
}
|
||||
|
||||
if (regno == 8) i = 10;
|
||||
@@ -640,13 +636,11 @@ rombug_fetch_register (regno)
|
||||
val = 0;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
#if TARGET_BYTE_ORDER == BIG_ENDIAN
|
||||
get_hex_byte(&b);
|
||||
val = (val << 8) + b;
|
||||
#else
|
||||
get_hex_byte(&b);
|
||||
val = val + (b << (j*8));
|
||||
#endif
|
||||
get_hex_byte (&b);
|
||||
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||
val = (val << 8) + b;
|
||||
else
|
||||
val = val + (b << (j*8));
|
||||
}
|
||||
supply_register (regno, (char *) &val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user