Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
 target/arm/cpu.h | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index a5a8779aba..f7b861c6d6 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -407,17 +407,8 @@ typedef struct CPUArchState {
         union { /* Fault address registers. */
             struct {
                 uint64_t _unused_far0;
-#if HOST_BIG_ENDIAN
-                uint32_t ifar_ns;
-                uint32_t dfar_ns;
-                uint32_t ifar_s;
-                uint32_t dfar_s;
-#else
-                uint32_t dfar_ns;
-                uint32_t ifar_ns;
-                uint32_t dfar_s;
-                uint32_t ifar_s;
-#endif
+                uint32_t HOST_ENDIAN_FIELDS(dfar_ns, ifar_ns);
+                uint32_t HOST_ENDIAN_FIELDS(dfar_s, ifar_s);
                 uint64_t _unused_far3;
             };
             uint64_t far_el[4];
@@ -444,21 +435,10 @@ typedef struct CPUArchState {
         uint64_t c9_pminten; /* perf monitor interrupt enables */
         union { /* Memory attribute redirection */
             struct {
-#if HOST_BIG_ENDIAN
                 uint64_t _unused_mair_0;
-                uint32_t mair1_ns;
-                uint32_t mair0_ns;
+                uint32_t HOST_ENDIAN_FIELDS(mair0_ns, mair1_ns);
                 uint64_t _unused_mair_1;
-                uint32_t mair1_s;
-                uint32_t mair0_s;
-#else
-                uint64_t _unused_mair_0;
-                uint32_t mair0_ns;
-                uint32_t mair1_ns;
-                uint64_t _unused_mair_1;
-                uint32_t mair0_s;
-                uint32_t mair1_s;
-#endif
+                uint32_t HOST_ENDIAN_FIELDS(mair0_s, mair1_s);
             };
             uint64_t mair_el[4];
         };
-- 
2.43.0


Reply via email to