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/cgen-ops.h | |
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/cgen-ops.h')
-rw-r--r-- | sim/common/cgen-ops.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h index 9256d8b..7ff1b4d 100644 --- a/sim/common/cgen-ops.h +++ b/sim/common/cgen-ops.h @@ -404,7 +404,7 @@ SUBWORDXFSI (XF in, int word) /* Note: typedef struct { SI parts[3]; } XF; */ union { XF in; SI out[3]; } x; x.in = in; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return x.out[word]; else return x.out[2 - word]; @@ -416,7 +416,7 @@ SUBWORDTFSI (TF in, int word) /* Note: typedef struct { SI parts[4]; } TF; */ union { TF in; SI out[4]; } x; x.in = in; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return x.out[word]; else return x.out[3 - word]; @@ -432,7 +432,7 @@ SEMOPS_INLINE DF JOINSIDF (SI x0, SI x1) { union { SI in[2]; DF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1; else x.in[1] = x0, x.in[0] = x1; @@ -443,7 +443,7 @@ SEMOPS_INLINE XF JOINSIXF (SI x0, SI x1, SI x2) { union { SI in[3]; XF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1, x.in[2] = x2; else x.in[2] = x0, x.in[1] = x1, x.in[0] = x2; @@ -454,7 +454,7 @@ SEMOPS_INLINE TF JOINSITF (SI x0, SI x1, SI x2, SI x3) { union { SI in[4]; TF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1, x.in[2] = x2, x.in[3] = x3; else x.in[3] = x0, x.in[2] = x1, x.in[1] = x2, x.in[0] = x3; |