diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-02 17:46:16 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-03 00:18:07 -0500 |
commit | 1ac72f0659d64d6a14da862242db0d841d2878d0 (patch) | |
tree | d7d792ba2df8227b99240650e99087e1f6008813 /sim/common/sim-options.c | |
parent | 987f8739051ff368ecaf6ca1e0fc966c974381a1 (diff) | |
download | gdb-1ac72f0659d64d6a14da862242db0d841d2878d0.zip gdb-1ac72f0659d64d6a14da862242db0d841d2878d0.tar.gz gdb-1ac72f0659d64d6a14da862242db0d841d2878d0.tar.bz2 |
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.
Diffstat (limited to 'sim/common/sim-options.c')
-rw-r--r-- | sim/common/sim-options.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 1fca5de..e252756 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -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 { |