mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
sim: convert to bfd_endian
Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine.
This commit is contained in:
@@ -197,23 +197,23 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
|
||||
case OPTION_ENDIAN:
|
||||
if (strcmp (arg, "big") == 0)
|
||||
{
|
||||
if (WITH_TARGET_BYTE_ORDER == LITTLE_ENDIAN)
|
||||
if (WITH_TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
|
||||
{
|
||||
sim_io_eprintf (sd, "Simulator compiled for little endian only.\n");
|
||||
return SIM_RC_FAIL;
|
||||
}
|
||||
/* FIXME:wip: Need to set something in STATE_CONFIG. */
|
||||
current_target_byte_order = BIG_ENDIAN;
|
||||
current_target_byte_order = BFD_ENDIAN_BIG;
|
||||
}
|
||||
else if (strcmp (arg, "little") == 0)
|
||||
{
|
||||
if (WITH_TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||
if (WITH_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
|
||||
{
|
||||
sim_io_eprintf (sd, "Simulator compiled for big endian only.\n");
|
||||
return SIM_RC_FAIL;
|
||||
}
|
||||
/* FIXME:wip: Need to set something in STATE_CONFIG. */
|
||||
current_target_byte_order = LITTLE_ENDIAN;
|
||||
current_target_byte_order = BFD_ENDIAN_LITTLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user