Commit e2542fe2bce6756948dffe2d233d154a9e25bd35

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent f0667e66

rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile.target
@@ -234,7 +234,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld @@ -234,7 +234,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
234 endif 234 endif
235 235
236 ifeq ($(ARCH),mips) 236 ifeq ($(ARCH),mips)
237 -ifeq ($(WORDS_BIGENDIAN),yes) 237 +ifeq ($(HOST_WORDS_BIGENDIAN),y)
238 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld 238 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
239 else 239 else
240 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld 240 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -242,7 +242,7 @@ endif @@ -242,7 +242,7 @@ endif
242 endif 242 endif
243 243
244 ifeq ($(ARCH),mips64) 244 ifeq ($(ARCH),mips64)
245 -ifeq ($(WORDS_BIGENDIAN),yes) 245 +ifeq ($(HOST_WORDS_BIGENDIAN),y)
246 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld 246 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
247 else 247 else
248 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld 248 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -377,7 +377,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld @@ -377,7 +377,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
377 endif 377 endif
378 378
379 ifeq ($(ARCH),mips) 379 ifeq ($(ARCH),mips)
380 -ifeq ($(WORDS_BIGENDIAN),yes) 380 +ifeq ($(HOST_WORDS_BIGENDIAN),y)
381 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld 381 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
382 else 382 else
383 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld 383 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -385,7 +385,7 @@ endif @@ -385,7 +385,7 @@ endif
385 endif 385 endif
386 386
387 ifeq ($(ARCH),mips64) 387 ifeq ($(ARCH),mips64)
388 -ifeq ($(WORDS_BIGENDIAN),yes) 388 +ifeq ($(HOST_WORDS_BIGENDIAN),y)
389 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld 389 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
390 else 390 else
391 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld 391 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
audio/audio.h
@@ -38,7 +38,7 @@ typedef enum { @@ -38,7 +38,7 @@ typedef enum {
38 AUD_FMT_S32 38 AUD_FMT_S32
39 } audfmt_e; 39 } audfmt_e;
40 40
41 -#ifdef WORDS_BIGENDIAN 41 +#ifdef HOST_WORDS_BIGENDIAN
42 #define AUDIO_HOST_ENDIANNESS 1 42 #define AUDIO_HOST_ENDIANNESS 1
43 #else 43 #else
44 #define AUDIO_HOST_ENDIANNESS 0 44 #define AUDIO_HOST_ENDIANNESS 0
@@ -81,7 +81,7 @@ static inline void bswap64s(uint64_t *s) @@ -81,7 +81,7 @@ static inline void bswap64s(uint64_t *s)
81 *s = bswap64(*s); 81 *s = bswap64(*s);
82 } 82 }
83 83
84 -#if defined(WORDS_BIGENDIAN) 84 +#if defined(HOST_WORDS_BIGENDIAN)
85 #define be_bswap(v, size) (v) 85 #define be_bswap(v, size) (v)
86 #define le_bswap(v, size) bswap ## size(v) 86 #define le_bswap(v, size) bswap ## size(v)
87 #define be_bswaps(v, size) 87 #define be_bswaps(v, size)
@@ -203,7 +203,7 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v) @@ -203,7 +203,7 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
203 203
204 #endif 204 #endif
205 205
206 -#ifdef WORDS_BIGENDIAN 206 +#ifdef HOST_WORDS_BIGENDIAN
207 #define cpu_to_32wu cpu_to_be32wu 207 #define cpu_to_32wu cpu_to_be32wu
208 #else 208 #else
209 #define cpu_to_32wu cpu_to_le32wu 209 #define cpu_to_32wu cpu_to_le32wu
configure
@@ -1528,8 +1528,8 @@ if test &quot;$strip_opt&quot; = &quot;yes&quot; ; then @@ -1528,8 +1528,8 @@ if test &quot;$strip_opt&quot; = &quot;yes&quot; ; then
1528 echo "STRIP_OPT=-s" >> $config_host_mak 1528 echo "STRIP_OPT=-s" >> $config_host_mak
1529 fi 1529 fi
1530 if test "$bigendian" = "yes" ; then 1530 if test "$bigendian" = "yes" ; then
1531 - echo "WORDS_BIGENDIAN=yes" >> $config_host_mak  
1532 - echo "#define WORDS_BIGENDIAN 1" >> $config_host_h 1531 + echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak
  1532 + echo "#define HOST_WORDS_BIGENDIAN 1" >> $config_host_h
1533 fi 1533 fi
1534 echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h 1534 echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h
1535 if test "$mingw32" = "yes" ; then 1535 if test "$mingw32" = "yes" ; then
console.c
@@ -307,7 +307,7 @@ static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w, @@ -307,7 +307,7 @@ static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w,
307 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \ 307 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
308 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )) 308 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
309 309
310 -#ifdef WORDS_BIGENDIAN 310 +#ifdef HOST_WORDS_BIGENDIAN
311 #define PAT(x) x 311 #define PAT(x) x
312 #else 312 #else
313 #define PAT(x) cbswap_32(x) 313 #define PAT(x) cbswap_32(x)
@@ -1559,7 +1559,7 @@ DisplaySurface* defaultallocator_create_displaysurface(int width, int height) @@ -1559,7 +1559,7 @@ DisplaySurface* defaultallocator_create_displaysurface(int width, int height)
1559 surface->height = height; 1559 surface->height = height;
1560 surface->linesize = width * 4; 1560 surface->linesize = width * 4;
1561 surface->pf = qemu_default_pixelformat(32); 1561 surface->pf = qemu_default_pixelformat(32);
1562 -#ifdef WORDS_BIGENDIAN 1562 +#ifdef HOST_WORDS_BIGENDIAN
1563 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG; 1563 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
1564 #else 1564 #else
1565 surface->flags = QEMU_ALLOCATED_FLAG; 1565 surface->flags = QEMU_ALLOCATED_FLAG;
@@ -1580,7 +1580,7 @@ DisplaySurface* defaultallocator_resize_displaysurface(DisplaySurface *surface, @@ -1580,7 +1580,7 @@ DisplaySurface* defaultallocator_resize_displaysurface(DisplaySurface *surface,
1580 surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height); 1580 surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height);
1581 else 1581 else
1582 surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height); 1582 surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height);
1583 -#ifdef WORDS_BIGENDIAN 1583 +#ifdef HOST_WORDS_BIGENDIAN
1584 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG; 1584 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
1585 #else 1585 #else
1586 surface->flags = QEMU_ALLOCATED_FLAG; 1586 surface->flags = QEMU_ALLOCATED_FLAG;
@@ -1598,7 +1598,7 @@ DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp, @@ -1598,7 +1598,7 @@ DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
1598 surface->height = height; 1598 surface->height = height;
1599 surface->linesize = linesize; 1599 surface->linesize = linesize;
1600 surface->pf = qemu_default_pixelformat(bpp); 1600 surface->pf = qemu_default_pixelformat(bpp);
1601 -#ifdef WORDS_BIGENDIAN 1601 +#ifdef HOST_WORDS_BIGENDIAN
1602 surface->flags = QEMU_BIG_ENDIAN_FLAG; 1602 surface->flags = QEMU_BIG_ENDIAN_FLAG;
1603 #endif 1603 #endif
1604 surface->data = data; 1604 surface->data = data;
cpu-all.h
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 * WORDS_ALIGNED : if defined, the host cpu can only make word aligned 27 * WORDS_ALIGNED : if defined, the host cpu can only make word aligned
28 * memory accesses. 28 * memory accesses.
29 * 29 *
30 - * WORDS_BIGENDIAN : if defined, the host cpu is big endian and 30 + * HOST_WORDS_BIGENDIAN : if defined, the host cpu is big endian and
31 * otherwise little endian. 31 * otherwise little endian.
32 * 32 *
33 * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet)) 33 * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 37
38 #include "softfloat.h" 38 #include "softfloat.h"
39 39
40 -#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) 40 +#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
41 #define BSWAP_NEEDED 41 #define BSWAP_NEEDED
42 #endif 42 #endif
43 43
@@ -123,7 +123,7 @@ typedef union { @@ -123,7 +123,7 @@ typedef union {
123 endian ! */ 123 endian ! */
124 typedef union { 124 typedef union {
125 float64 d; 125 float64 d;
126 -#if defined(WORDS_BIGENDIAN) \ 126 +#if defined(HOST_WORDS_BIGENDIAN) \
127 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) 127 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
128 struct { 128 struct {
129 uint32_t upper; 129 uint32_t upper;
@@ -141,7 +141,7 @@ typedef union { @@ -141,7 +141,7 @@ typedef union {
141 #ifdef TARGET_SPARC 141 #ifdef TARGET_SPARC
142 typedef union { 142 typedef union {
143 float128 q; 143 float128 q;
144 -#if defined(WORDS_BIGENDIAN) \ 144 +#if defined(HOST_WORDS_BIGENDIAN) \
145 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) 145 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
146 struct { 146 struct {
147 uint32_t upmost; 147 uint32_t upmost;
@@ -221,7 +221,7 @@ static inline void stb_p(void *ptr, int v) @@ -221,7 +221,7 @@ static inline void stb_p(void *ptr, int v)
221 /* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the 221 /* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the
222 kernel handles unaligned load/stores may give better results, but 222 kernel handles unaligned load/stores may give better results, but
223 it is a system wide setting : bad */ 223 it is a system wide setting : bad */
224 -#if defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED) 224 +#if defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
225 225
226 /* conservative code for little endian unaligned accesses */ 226 /* conservative code for little endian unaligned accesses */
227 static inline int lduw_le_p(const void *ptr) 227 static inline int lduw_le_p(const void *ptr)
@@ -398,7 +398,7 @@ static inline void stfq_le_p(void *ptr, float64 v) @@ -398,7 +398,7 @@ static inline void stfq_le_p(void *ptr, float64 v)
398 } 398 }
399 #endif 399 #endif
400 400
401 -#if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED) 401 +#if !defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
402 402
403 static inline int lduw_be_p(const void *ptr) 403 static inline int lduw_be_p(const void *ptr)
404 { 404 {
cpu-defs.h
@@ -106,7 +106,7 @@ typedef struct CPUTLBEntry { @@ -106,7 +106,7 @@ typedef struct CPUTLBEntry {
106 sizeof(target_phys_addr_t))]; 106 sizeof(target_phys_addr_t))];
107 } CPUTLBEntry; 107 } CPUTLBEntry;
108 108
109 -#ifdef WORDS_BIGENDIAN 109 +#ifdef HOST_WORDS_BIGENDIAN
110 typedef struct icount_decr_u16 { 110 typedef struct icount_decr_u16 {
111 uint16_t high; 111 uint16_t high;
112 uint16_t low; 112 uint16_t low;
@@ -246,7 +246,7 @@ void disas(FILE *out, void *code, unsigned long size) @@ -246,7 +246,7 @@ void disas(FILE *out, void *code, unsigned long size)
246 disasm_info.buffer_vma = (unsigned long)code; 246 disasm_info.buffer_vma = (unsigned long)code;
247 disasm_info.buffer_length = size; 247 disasm_info.buffer_length = size;
248 248
249 -#ifdef WORDS_BIGENDIAN 249 +#ifdef HOST_WORDS_BIGENDIAN
250 disasm_info.endian = BFD_ENDIAN_BIG; 250 disasm_info.endian = BFD_ENDIAN_BIG;
251 #else 251 #else
252 disasm_info.endian = BFD_ENDIAN_LITTLE; 252 disasm_info.endian = BFD_ENDIAN_LITTLE;
fpu/softfloat.h
@@ -146,7 +146,7 @@ typedef struct { @@ -146,7 +146,7 @@ typedef struct {
146 #endif 146 #endif
147 #ifdef FLOAT128 147 #ifdef FLOAT128
148 typedef struct { 148 typedef struct {
149 -#ifdef WORDS_BIGENDIAN 149 +#ifdef HOST_WORDS_BIGENDIAN
150 uint64_t high, low; 150 uint64_t high, low;
151 #else 151 #else
152 uint64_t low, high; 152 uint64_t low, high;
hw/blizzard_template.h
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 # error unknown bit depth 41 # error unknown bit depth
42 #endif 42 #endif
43 43
44 -#ifdef WORDS_BIGENDIAN 44 +#ifdef HOST_WORDS_BIGENDIAN
45 # define SWAP_WORDS 1 45 # define SWAP_WORDS 1
46 #endif 46 #endif
47 47
hw/bt-hci.c
@@ -419,7 +419,7 @@ static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *dat @@ -419,7 +419,7 @@ static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *dat
419 * be continuously allocated. We do it though, to preserve similar 419 * be continuously allocated. We do it though, to preserve similar
420 * behaviour between hosts. Some things, like the BD_ADDR cannot be 420 * behaviour between hosts. Some things, like the BD_ADDR cannot be
421 * preserved though (for example if a real hci is used). */ 421 * preserved though (for example if a real hci is used). */
422 -#ifdef WORDS_BIGENDIAN 422 +#ifdef HOST_WORDS_BIGENDIAN
423 # define HNDL(raw) bswap16(raw) 423 # define HNDL(raw) bswap16(raw)
424 #else 424 #else
425 # define HNDL(raw) (raw) 425 # define HNDL(raw) (raw)
hw/gus.c
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 #define ldebug(...) 35 #define ldebug(...)
36 #endif 36 #endif
37 37
38 -#ifdef WORDS_BIGENDIAN 38 +#ifdef HOST_WORDS_BIGENDIAN
39 #define GUS_ENDIANNESS 1 39 #define GUS_ENDIANNESS 1
40 #else 40 #else
41 #define GUS_ENDIANNESS 0 41 #define GUS_ENDIANNESS 0
hw/omap_lcd_template.h
@@ -152,7 +152,7 @@ static void glue(draw_line12_, DEPTH)(void *opaque, @@ -152,7 +152,7 @@ static void glue(draw_line12_, DEPTH)(void *opaque,
152 static void glue(draw_line16_, DEPTH)(void *opaque, 152 static void glue(draw_line16_, DEPTH)(void *opaque,
153 uint8_t *d, const uint8_t *s, int width, int deststep) 153 uint8_t *d, const uint8_t *s, int width, int deststep)
154 { 154 {
155 -#if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) 155 +#if DEPTH == 16 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
156 memcpy(d, s, width * 2); 156 memcpy(d, s, width * 2);
157 #else 157 #else
158 uint16_t v; 158 uint16_t v;
hw/pl110_template.h
@@ -95,18 +95,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[36] = @@ -95,18 +95,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[36] =
95 95
96 #if ORDER == 0 96 #if ORDER == 0
97 #define NAME glue(glue(lblp_, BORDER), BITS) 97 #define NAME glue(glue(lblp_, BORDER), BITS)
98 -#ifdef WORDS_BIGENDIAN 98 +#ifdef HOST_WORDS_BIGENDIAN
99 #define SWAP_WORDS 1 99 #define SWAP_WORDS 1
100 #endif 100 #endif
101 #elif ORDER == 1 101 #elif ORDER == 1
102 #define NAME glue(glue(bbbp_, BORDER), BITS) 102 #define NAME glue(glue(bbbp_, BORDER), BITS)
103 -#ifndef WORDS_BIGENDIAN 103 +#ifndef HOST_WORDS_BIGENDIAN
104 #define SWAP_WORDS 1 104 #define SWAP_WORDS 1
105 #endif 105 #endif
106 #else 106 #else
107 #define SWAP_PIXELS 1 107 #define SWAP_PIXELS 1
108 #define NAME glue(glue(lbbp_, BORDER), BITS) 108 #define NAME glue(glue(lbbp_, BORDER), BITS)
109 -#ifdef WORDS_BIGENDIAN 109 +#ifdef HOST_WORDS_BIGENDIAN
110 #define SWAP_WORDS 1 110 #define SWAP_WORDS 1
111 #endif 111 #endif
112 #endif 112 #endif
hw/pxa2xx_template.h
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 # error unknown bit depth 23 # error unknown bit depth
24 #endif 24 #endif
25 25
26 -#ifdef WORDS_BIGENDIAN 26 +#ifdef HOST_WORDS_BIGENDIAN
27 # define SWAP_WORDS 1 27 # define SWAP_WORDS 1
28 #endif 28 #endif
29 29
hw/vga.c
@@ -74,19 +74,19 @@ const uint8_t gr_mask[16] = { @@ -74,19 +74,19 @@ const uint8_t gr_mask[16] = {
74 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \ 74 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
75 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )) 75 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
76 76
77 -#ifdef WORDS_BIGENDIAN 77 +#ifdef HOST_WORDS_BIGENDIAN
78 #define PAT(x) cbswap_32(x) 78 #define PAT(x) cbswap_32(x)
79 #else 79 #else
80 #define PAT(x) (x) 80 #define PAT(x) (x)
81 #endif 81 #endif
82 82
83 -#ifdef WORDS_BIGENDIAN 83 +#ifdef HOST_WORDS_BIGENDIAN
84 #define BIG 1 84 #define BIG 1
85 #else 85 #else
86 #define BIG 0 86 #define BIG 0
87 #endif 87 #endif
88 88
89 -#ifdef WORDS_BIGENDIAN 89 +#ifdef HOST_WORDS_BIGENDIAN
90 #define GET_PLANE(data, p) (((data) >> (24 - (p) * 8)) & 0xff) 90 #define GET_PLANE(data, p) (((data) >> (24 - (p) * 8)) & 0xff)
91 #else 91 #else
92 #define GET_PLANE(data, p) (((data) >> ((p) * 8)) & 0xff) 92 #define GET_PLANE(data, p) (((data) >> ((p) * 8)) & 0xff)
@@ -113,7 +113,7 @@ static const uint32_t mask16[16] = { @@ -113,7 +113,7 @@ static const uint32_t mask16[16] = {
113 113
114 #undef PAT 114 #undef PAT
115 115
116 -#ifdef WORDS_BIGENDIAN 116 +#ifdef HOST_WORDS_BIGENDIAN
117 #define PAT(x) (x) 117 #define PAT(x) (x)
118 #else 118 #else
119 #define PAT(x) cbswap_32(x) 119 #define PAT(x) cbswap_32(x)
@@ -1369,7 +1369,7 @@ static void vga_draw_text(VGAState *s, int full_update) @@ -1369,7 +1369,7 @@ static void vga_draw_text(VGAState *s, int full_update)
1369 if (cx > cx_max) 1369 if (cx > cx_max)
1370 cx_max = cx; 1370 cx_max = cx;
1371 *ch_attr_ptr = ch_attr; 1371 *ch_attr_ptr = ch_attr;
1372 -#ifdef WORDS_BIGENDIAN 1372 +#ifdef HOST_WORDS_BIGENDIAN
1373 ch = ch_attr >> 8; 1373 ch = ch_attr >> 8;
1374 cattr = ch_attr & 0xff; 1374 cattr = ch_attr & 0xff;
1375 #else 1375 #else
@@ -1632,7 +1632,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) @@ -1632,7 +1632,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
1632 disp_width != s->last_width || 1632 disp_width != s->last_width ||
1633 height != s->last_height || 1633 height != s->last_height ||
1634 s->last_depth != depth) { 1634 s->last_depth != depth) {
1635 -#if defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) 1635 +#if defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
1636 if (depth == 16 || depth == 32) { 1636 if (depth == 16 || depth == 32) {
1637 #else 1637 #else
1638 if (depth == 32) { 1638 if (depth == 32) {
@@ -1641,7 +1641,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) @@ -1641,7 +1641,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
1641 s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth, 1641 s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth,
1642 s->line_offset, 1642 s->line_offset,
1643 s->vram_ptr + (s->start_addr * 4)); 1643 s->vram_ptr + (s->start_addr * 4));
1644 -#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) 1644 +#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
1645 s->ds->surface->pf = qemu_different_endianness_pixelformat(depth); 1645 s->ds->surface->pf = qemu_different_endianness_pixelformat(depth);
1646 #endif 1646 #endif
1647 dpy_resize(s->ds); 1647 dpy_resize(s->ds);
hw/vga_template.h
@@ -417,7 +417,7 @@ void glue(vga_draw_cursor_line_, DEPTH)(uint8_t *d1, @@ -417,7 +417,7 @@ void glue(vga_draw_cursor_line_, DEPTH)(uint8_t *d1,
417 static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d, 417 static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
418 const uint8_t *s, int width) 418 const uint8_t *s, int width)
419 { 419 {
420 -#if DEPTH == 15 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) 420 +#if DEPTH == 15 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
421 memcpy(d, s, width * 2); 421 memcpy(d, s, width * 2);
422 #else 422 #else
423 int w; 423 int w;
@@ -442,7 +442,7 @@ static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d, @@ -442,7 +442,7 @@ static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
442 static void glue(vga_draw_line16_, PIXEL_NAME)(VGAState *s1, uint8_t *d, 442 static void glue(vga_draw_line16_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
443 const uint8_t *s, int width) 443 const uint8_t *s, int width)
444 { 444 {
445 -#if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) 445 +#if DEPTH == 16 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
446 memcpy(d, s, width * 2); 446 memcpy(d, s, width * 2);
447 #else 447 #else
448 int w; 448 int w;
@@ -493,7 +493,7 @@ static void glue(vga_draw_line24_, PIXEL_NAME)(VGAState *s1, uint8_t *d, @@ -493,7 +493,7 @@ static void glue(vga_draw_line24_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
493 static void glue(vga_draw_line32_, PIXEL_NAME)(VGAState *s1, uint8_t *d, 493 static void glue(vga_draw_line32_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
494 const uint8_t *s, int width) 494 const uint8_t *s, int width)
495 { 495 {
496 -#if DEPTH == 32 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) && !defined(BGR_FORMAT) 496 +#if DEPTH == 32 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) && !defined(BGR_FORMAT)
497 memcpy(d, s, width * 4); 497 memcpy(d, s, width * 4);
498 #else 498 #else
499 int w; 499 int w;
linux-user/arm/nwfpe/double_cpdo.c
@@ -150,7 +150,7 @@ unsigned int DoubleCPDO(const unsigned int opcode) @@ -150,7 +150,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)
150 case MNF_CODE: 150 case MNF_CODE:
151 { 151 {
152 unsigned int *p = (unsigned int*)&rFm; 152 unsigned int *p = (unsigned int*)&rFm;
153 -#ifdef WORDS_BIGENDIAN 153 +#ifdef HOST_WORDS_BIGENDIAN
154 p[0] ^= 0x80000000; 154 p[0] ^= 0x80000000;
155 #else 155 #else
156 p[1] ^= 0x80000000; 156 p[1] ^= 0x80000000;
@@ -162,7 +162,7 @@ unsigned int DoubleCPDO(const unsigned int opcode) @@ -162,7 +162,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)
162 case ABS_CODE: 162 case ABS_CODE:
163 { 163 {
164 unsigned int *p = (unsigned int*)&rFm; 164 unsigned int *p = (unsigned int*)&rFm;
165 -#ifdef WORDS_BIGENDIAN 165 +#ifdef HOST_WORDS_BIGENDIAN
166 p[0] &= 0x7fffffff; 166 p[0] &= 0x7fffffff;
167 #else 167 #else
168 p[1] &= 0x7fffffff; 168 p[1] &= 0x7fffffff;
linux-user/arm/nwfpe/fpa11_cpdt.c
@@ -44,7 +44,7 @@ void loadDouble(const unsigned int Fn, target_ulong addr) @@ -44,7 +44,7 @@ void loadDouble(const unsigned int Fn, target_ulong addr)
44 unsigned int *p; 44 unsigned int *p;
45 p = (unsigned int*)&fpa11->fpreg[Fn].fDouble; 45 p = (unsigned int*)&fpa11->fpreg[Fn].fDouble;
46 fpa11->fType[Fn] = typeDouble; 46 fpa11->fType[Fn] = typeDouble;
47 -#ifdef WORDS_BIGENDIAN 47 +#ifdef HOST_WORDS_BIGENDIAN
48 /* FIXME - handle failure of get_user() */ 48 /* FIXME - handle failure of get_user() */
49 get_user_u32(p[0], addr); /* sign & exponent */ 49 get_user_u32(p[0], addr); /* sign & exponent */
50 get_user_u32(p[1], addr + 4); 50 get_user_u32(p[1], addr + 4);
@@ -147,7 +147,7 @@ void storeDouble(const unsigned int Fn, target_ulong addr) @@ -147,7 +147,7 @@ void storeDouble(const unsigned int Fn, target_ulong addr)
147 default: val = fpa11->fpreg[Fn].fDouble; 147 default: val = fpa11->fpreg[Fn].fDouble;
148 } 148 }
149 /* FIXME - handle put_user() failures */ 149 /* FIXME - handle put_user() failures */
150 -#ifdef WORDS_BIGENDIAN 150 +#ifdef HOST_WORDS_BIGENDIAN
151 put_user_u32(p[0], addr); /* msw */ 151 put_user_u32(p[0], addr); /* msw */
152 put_user_u32(p[1], addr + 4); /* lsw */ 152 put_user_u32(p[1], addr + 4); /* lsw */
153 #else 153 #else
loader.c
@@ -324,7 +324,7 @@ int load_elf(const char *filename, int64_t address_offset, @@ -324,7 +324,7 @@ int load_elf(const char *filename, int64_t address_offset,
324 e_ident[2] != ELFMAG2 || 324 e_ident[2] != ELFMAG2 ||
325 e_ident[3] != ELFMAG3) 325 e_ident[3] != ELFMAG3)
326 goto fail; 326 goto fail;
327 -#ifdef WORDS_BIGENDIAN 327 +#ifdef HOST_WORDS_BIGENDIAN
328 data_order = ELFDATA2MSB; 328 data_order = ELFDATA2MSB;
329 #else 329 #else
330 data_order = ELFDATA2LSB; 330 data_order = ELFDATA2LSB;
@@ -358,7 +358,7 @@ int load_elf(const char *filename, int64_t address_offset, @@ -358,7 +358,7 @@ int load_elf(const char *filename, int64_t address_offset,
358 358
359 static void bswap_uboot_header(uboot_image_header_t *hdr) 359 static void bswap_uboot_header(uboot_image_header_t *hdr)
360 { 360 {
361 -#ifndef WORDS_BIGENDIAN 361 +#ifndef HOST_WORDS_BIGENDIAN
362 bswap32s(&hdr->ih_magic); 362 bswap32s(&hdr->ih_magic);
363 bswap32s(&hdr->ih_hcrc); 363 bswap32s(&hdr->ih_hcrc);
364 bswap32s(&hdr->ih_time); 364 bswap32s(&hdr->ih_time);
@@ -185,7 +185,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height) @@ -185,7 +185,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height)
185 surface->linesize = width * host_format.BytesPerPixel; 185 surface->linesize = width * host_format.BytesPerPixel;
186 surface->pf = sdl_to_qemu_pixelformat(&host_format); 186 surface->pf = sdl_to_qemu_pixelformat(&host_format);
187 } 187 }
188 -#ifdef WORDS_BIGENDIAN 188 +#ifdef HOST_WORDS_BIGENDIAN
189 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG; 189 surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
190 #else 190 #else
191 surface->flags = QEMU_ALLOCATED_FLAG; 191 surface->flags = QEMU_ALLOCATED_FLAG;
@@ -204,7 +204,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height) @@ -204,7 +204,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height)
204 surface->linesize = real_screen->pitch; 204 surface->linesize = real_screen->pitch;
205 surface->data = real_screen->pixels; 205 surface->data = real_screen->pixels;
206 206
207 -#ifdef WORDS_BIGENDIAN 207 +#ifdef HOST_WORDS_BIGENDIAN
208 surface->flags = QEMU_REALPIXELS_FLAG | QEMU_BIG_ENDIAN_FLAG; 208 surface->flags = QEMU_REALPIXELS_FLAG | QEMU_BIG_ENDIAN_FLAG;
209 #else 209 #else
210 surface->flags = QEMU_REALPIXELS_FLAG; 210 surface->flags = QEMU_REALPIXELS_FLAG;
slirp/ip.h
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 #ifndef _IP_H_ 33 #ifndef _IP_H_
34 #define _IP_H_ 34 #define _IP_H_
35 35
36 -#ifdef WORDS_BIGENDIAN 36 +#ifdef HOST_WORDS_BIGENDIAN
37 # ifndef NTOHL 37 # ifndef NTOHL
38 # define NTOHL(d) 38 # define NTOHL(d)
39 # endif 39 # endif
@@ -73,7 +73,7 @@ typedef u_int32_t n_long; /* long as received from the net */ @@ -73,7 +73,7 @@ typedef u_int32_t n_long; /* long as received from the net */
73 * Structure of an internet header, naked of options. 73 * Structure of an internet header, naked of options.
74 */ 74 */
75 struct ip { 75 struct ip {
76 -#ifdef WORDS_BIGENDIAN 76 +#ifdef HOST_WORDS_BIGENDIAN
77 u_int ip_v:4, /* version */ 77 u_int ip_v:4, /* version */
78 ip_hl:4; /* header length */ 78 ip_hl:4; /* header length */
79 #else 79 #else
@@ -139,7 +139,7 @@ struct ip_timestamp { @@ -139,7 +139,7 @@ struct ip_timestamp {
139 u_int8_t ipt_code; /* IPOPT_TS */ 139 u_int8_t ipt_code; /* IPOPT_TS */
140 u_int8_t ipt_len; /* size of structure (variable) */ 140 u_int8_t ipt_len; /* size of structure (variable) */
141 u_int8_t ipt_ptr; /* index of current entry */ 141 u_int8_t ipt_ptr; /* index of current entry */
142 -#ifdef WORDS_BIGENDIAN 142 +#ifdef HOST_WORDS_BIGENDIAN
143 u_int ipt_oflw:4, /* overflow counter */ 143 u_int ipt_oflw:4, /* overflow counter */
144 ipt_flg:4; /* flags, see below */ 144 ipt_flg:4; /* flags, see below */
145 #else 145 #else
slirp/slirp_config.h
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 #undef HAVE_SYS_BITYPES_H 83 #undef HAVE_SYS_BITYPES_H
84 84
85 /* Define if the machine is big endian */ 85 /* Define if the machine is big endian */
86 -//#undef WORDS_BIGENDIAN 86 +//#undef HOST_WORDS_BIGENDIAN
87 87
88 /* Define if your sprintf returns char * instead of int */ 88 /* Define if your sprintf returns char * instead of int */
89 #undef BAD_SPRINTF 89 #undef BAD_SPRINTF
slirp/tcp.h
@@ -50,7 +50,7 @@ struct tcphdr { @@ -50,7 +50,7 @@ struct tcphdr {
50 u_int16_t th_dport; /* destination port */ 50 u_int16_t th_dport; /* destination port */
51 tcp_seq th_seq; /* sequence number */ 51 tcp_seq th_seq; /* sequence number */
52 tcp_seq th_ack; /* acknowledgement number */ 52 tcp_seq th_ack; /* acknowledgement number */
53 -#ifdef WORDS_BIGENDIAN 53 +#ifdef HOST_WORDS_BIGENDIAN
54 u_int th_off:4, /* data offset */ 54 u_int th_off:4, /* data offset */
55 th_x2:4; /* (unused) */ 55 th_x2:4; /* (unused) */
56 #else 56 #else
target-arm/neon_helper.c
@@ -49,7 +49,7 @@ typedef struct \ @@ -49,7 +49,7 @@ typedef struct \
49 { \ 49 { \
50 type v1; \ 50 type v1; \
51 } neon_##name; 51 } neon_##name;
52 -#ifdef WORDS_BIGENDIAN 52 +#ifdef HOST_WORDS_BIGENDIAN
53 #define NEON_TYPE2(name, type) \ 53 #define NEON_TYPE2(name, type) \
54 typedef struct \ 54 typedef struct \
55 { \ 55 { \
target-i386/cpu.h
@@ -528,7 +528,7 @@ typedef union { @@ -528,7 +528,7 @@ typedef union {
528 uint64_t q; 528 uint64_t q;
529 } MMXReg; 529 } MMXReg;
530 530
531 -#ifdef WORDS_BIGENDIAN 531 +#ifdef HOST_WORDS_BIGENDIAN
532 #define XMM_B(n) _b[15 - (n)] 532 #define XMM_B(n) _b[15 - (n)]
533 #define XMM_W(n) _w[7 - (n)] 533 #define XMM_W(n) _w[7 - (n)]
534 #define XMM_L(n) _l[3 - (n)] 534 #define XMM_L(n) _l[3 - (n)]
target-i386/exec.h
@@ -155,7 +155,7 @@ typedef union { @@ -155,7 +155,7 @@ typedef union {
155 /* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */ 155 /* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
156 typedef union { 156 typedef union {
157 double d; 157 double d;
158 -#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) 158 +#if !defined(HOST_WORDS_BIGENDIAN) && !defined(__arm__)
159 struct { 159 struct {
160 uint32_t lower; 160 uint32_t lower;
161 int32_t upper; 161 int32_t upper;
target-i386/translate.c
@@ -255,7 +255,7 @@ static inline void gen_op_andl_A0_ffff(void) @@ -255,7 +255,7 @@ static inline void gen_op_andl_A0_ffff(void)
255 255
256 #endif /* !TARGET_X86_64 */ 256 #endif /* !TARGET_X86_64 */
257 257
258 -#if defined(WORDS_BIGENDIAN) 258 +#if defined(HOST_WORDS_BIGENDIAN)
259 #define REG_B_OFFSET (sizeof(target_ulong) - 1) 259 #define REG_B_OFFSET (sizeof(target_ulong) - 1)
260 #define REG_H_OFFSET (sizeof(target_ulong) - 2) 260 #define REG_H_OFFSET (sizeof(target_ulong) - 2)
261 #define REG_W_OFFSET (sizeof(target_ulong) - 2) 261 #define REG_W_OFFSET (sizeof(target_ulong) - 2)
@@ -7151,7 +7151,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) @@ -7151,7 +7151,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
7151 break; 7151 break;
7152 case 4: /* smsw */ 7152 case 4: /* smsw */
7153 gen_svm_check_intercept(s, pc_start, SVM_EXIT_READ_CR0); 7153 gen_svm_check_intercept(s, pc_start, SVM_EXIT_READ_CR0);
7154 -#if defined TARGET_X86_64 && defined WORDS_BIGENDIAN 7154 +#if defined TARGET_X86_64 && defined HOST_WORDS_BIGENDIAN
7155 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]) + 4); 7155 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]) + 4);
7156 #else 7156 #else
7157 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0])); 7157 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]));
target-mips/cpu.h
@@ -62,7 +62,7 @@ union fpr_t { @@ -62,7 +62,7 @@ union fpr_t {
62 /* define FP_ENDIAN_IDX to access the same location 62 /* define FP_ENDIAN_IDX to access the same location
63 * in the fpr_t union regardless of the host endianess 63 * in the fpr_t union regardless of the host endianess
64 */ 64 */
65 -#if defined(WORDS_BIGENDIAN) 65 +#if defined(HOST_WORDS_BIGENDIAN)
66 # define FP_ENDIAN_IDX 1 66 # define FP_ENDIAN_IDX 1
67 #else 67 #else
68 # define FP_ENDIAN_IDX 0 68 # define FP_ENDIAN_IDX 0
target-ppc/op_helper.c
@@ -1921,7 +1921,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_ @@ -1921,7 +1921,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_
1921 1921
1922 /*****************************************************************************/ 1922 /*****************************************************************************/
1923 /* Altivec extension helpers */ 1923 /* Altivec extension helpers */
1924 -#if defined(WORDS_BIGENDIAN) 1924 +#if defined(HOST_WORDS_BIGENDIAN)
1925 #define HI_IDX 0 1925 #define HI_IDX 0
1926 #define LO_IDX 1 1926 #define LO_IDX 1
1927 #else 1927 #else
@@ -1929,7 +1929,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_ @@ -1929,7 +1929,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_
1929 #define LO_IDX 0 1929 #define LO_IDX 0
1930 #endif 1930 #endif
1931 1931
1932 -#if defined(WORDS_BIGENDIAN) 1932 +#if defined(HOST_WORDS_BIGENDIAN)
1933 #define VECTOR_FOR_INORDER_I(index, element) \ 1933 #define VECTOR_FOR_INORDER_I(index, element) \
1934 for (index = 0; index < ARRAY_SIZE(r->element); index++) 1934 for (index = 0; index < ARRAY_SIZE(r->element); index++)
1935 #else 1935 #else
@@ -2055,7 +2055,7 @@ STVE(stvewx, stl, bswap32, u32) @@ -2055,7 +2055,7 @@ STVE(stvewx, stl, bswap32, u32)
2055 2055
2056 void helper_mtvscr (ppc_avr_t *r) 2056 void helper_mtvscr (ppc_avr_t *r)
2057 { 2057 {
2058 -#if defined(WORDS_BIGENDIAN) 2058 +#if defined(HOST_WORDS_BIGENDIAN)
2059 env->vscr = r->u32[3]; 2059 env->vscr = r->u32[3];
2060 #else 2060 #else
2061 env->vscr = r->u32[0]; 2061 env->vscr = r->u32[0];
@@ -2422,7 +2422,7 @@ void helper_vmladduhm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) @@ -2422,7 +2422,7 @@ void helper_vmladduhm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
2422 } \ 2422 } \
2423 *r = result; \ 2423 *r = result; \
2424 } 2424 }
2425 -#if defined(WORDS_BIGENDIAN) 2425 +#if defined(HOST_WORDS_BIGENDIAN)
2426 #define MRGHI 0 2426 #define MRGHI 0
2427 #define MRGLO 1 2427 #define MRGLO 1
2428 #else 2428 #else
@@ -2583,7 +2583,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) @@ -2583,7 +2583,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
2583 int i; 2583 int i;
2584 VECTOR_FOR_INORDER_I (i, u8) { 2584 VECTOR_FOR_INORDER_I (i, u8) {
2585 int s = c->u8[i] & 0x1f; 2585 int s = c->u8[i] & 0x1f;
2586 -#if defined(WORDS_BIGENDIAN) 2586 +#if defined(HOST_WORDS_BIGENDIAN)
2587 int index = s & 0xf; 2587 int index = s & 0xf;
2588 #else 2588 #else
2589 int index = 15 - (s & 0xf); 2589 int index = 15 - (s & 0xf);
@@ -2597,7 +2597,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) @@ -2597,7 +2597,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
2597 *r = result; 2597 *r = result;
2598 } 2598 }
2599 2599
2600 -#if defined(WORDS_BIGENDIAN) 2600 +#if defined(HOST_WORDS_BIGENDIAN)
2601 #define PKBIG 1 2601 #define PKBIG 1
2602 #else 2602 #else
2603 #define PKBIG 0 2603 #define PKBIG 0
@@ -2606,7 +2606,7 @@ void helper_vpkpx (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2606,7 +2606,7 @@ void helper_vpkpx (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2606 { 2606 {
2607 int i, j; 2607 int i, j;
2608 ppc_avr_t result; 2608 ppc_avr_t result;
2609 -#if defined(WORDS_BIGENDIAN) 2609 +#if defined(HOST_WORDS_BIGENDIAN)
2610 const ppc_avr_t *x[2] = { a, b }; 2610 const ppc_avr_t *x[2] = { a, b };
2611 #else 2611 #else
2612 const ppc_avr_t *x[2] = { b, a }; 2612 const ppc_avr_t *x[2] = { b, a };
@@ -2723,7 +2723,7 @@ void helper_vlogefp (ppc_avr_t *r, ppc_avr_t *b) @@ -2723,7 +2723,7 @@ void helper_vlogefp (ppc_avr_t *r, ppc_avr_t *b)
2723 } 2723 }
2724 } 2724 }
2725 2725
2726 -#if defined(WORDS_BIGENDIAN) 2726 +#if defined(HOST_WORDS_BIGENDIAN)
2727 #define LEFT 0 2727 #define LEFT 0
2728 #define RIGHT 1 2728 #define RIGHT 1
2729 #else 2729 #else
@@ -2783,7 +2783,7 @@ void helper_vsldoi (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shift) @@ -2783,7 +2783,7 @@ void helper_vsldoi (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shift)
2783 int i; 2783 int i;
2784 ppc_avr_t result; 2784 ppc_avr_t result;
2785 2785
2786 -#if defined(WORDS_BIGENDIAN) 2786 +#if defined(HOST_WORDS_BIGENDIAN)
2787 for (i = 0; i < ARRAY_SIZE(r->u8); i++) { 2787 for (i = 0; i < ARRAY_SIZE(r->u8); i++) {
2788 int index = sh + i; 2788 int index = sh + i;
2789 if (index > 0xf) { 2789 if (index > 0xf) {
@@ -2809,7 +2809,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2809,7 +2809,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2809 { 2809 {
2810 int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf; 2810 int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf;
2811 2811
2812 -#if defined (WORDS_BIGENDIAN) 2812 +#if defined (HOST_WORDS_BIGENDIAN)
2813 memmove (&r->u8[0], &a->u8[sh], 16-sh); 2813 memmove (&r->u8[0], &a->u8[sh], 16-sh);
2814 memset (&r->u8[16-sh], 0, sh); 2814 memset (&r->u8[16-sh], 0, sh);
2815 #else 2815 #else
@@ -2820,7 +2820,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2820,7 +2820,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2820 2820
2821 /* Experimental testing shows that hardware masks the immediate. */ 2821 /* Experimental testing shows that hardware masks the immediate. */
2822 #define _SPLAT_MASKED(element) (splat & (ARRAY_SIZE(r->element) - 1)) 2822 #define _SPLAT_MASKED(element) (splat & (ARRAY_SIZE(r->element) - 1))
2823 -#if defined(WORDS_BIGENDIAN) 2823 +#if defined(HOST_WORDS_BIGENDIAN)
2824 #define SPLAT_ELEMENT(element) _SPLAT_MASKED(element) 2824 #define SPLAT_ELEMENT(element) _SPLAT_MASKED(element)
2825 #else 2825 #else
2826 #define SPLAT_ELEMENT(element) (ARRAY_SIZE(r->element)-1 - _SPLAT_MASKED(element)) 2826 #define SPLAT_ELEMENT(element) (ARRAY_SIZE(r->element)-1 - _SPLAT_MASKED(element))
@@ -2877,7 +2877,7 @@ void helper_vsro (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2877,7 +2877,7 @@ void helper_vsro (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2877 { 2877 {
2878 int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf; 2878 int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf;
2879 2879
2880 -#if defined (WORDS_BIGENDIAN) 2880 +#if defined (HOST_WORDS_BIGENDIAN)
2881 memmove (&r->u8[sh], &a->u8[0], 16-sh); 2881 memmove (&r->u8[sh], &a->u8[0], 16-sh);
2882 memset (&r->u8[0], 0, sh); 2882 memset (&r->u8[0], 0, sh);
2883 #else 2883 #else
@@ -2901,7 +2901,7 @@ void helper_vsumsws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2901,7 +2901,7 @@ void helper_vsumsws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2901 ppc_avr_t result; 2901 ppc_avr_t result;
2902 int sat = 0; 2902 int sat = 0;
2903 2903
2904 -#if defined(WORDS_BIGENDIAN) 2904 +#if defined(HOST_WORDS_BIGENDIAN)
2905 upper = ARRAY_SIZE(r->s32)-1; 2905 upper = ARRAY_SIZE(r->s32)-1;
2906 #else 2906 #else
2907 upper = 0; 2907 upper = 0;
@@ -2925,7 +2925,7 @@ void helper_vsum2sws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2925,7 +2925,7 @@ void helper_vsum2sws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2925 ppc_avr_t result; 2925 ppc_avr_t result;
2926 int sat = 0; 2926 int sat = 0;
2927 2927
2928 -#if defined(WORDS_BIGENDIAN) 2928 +#if defined(HOST_WORDS_BIGENDIAN)
2929 upper = 1; 2929 upper = 1;
2930 #else 2930 #else
2931 upper = 0; 2931 upper = 0;
@@ -2997,7 +2997,7 @@ void helper_vsum4ubs (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) @@ -2997,7 +2997,7 @@ void helper_vsum4ubs (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
2997 } 2997 }
2998 } 2998 }
2999 2999
3000 -#if defined(WORDS_BIGENDIAN) 3000 +#if defined(HOST_WORDS_BIGENDIAN)
3001 #define UPKHI 1 3001 #define UPKHI 1
3002 #define UPKLO 0 3002 #define UPKLO 0
3003 #else 3003 #else
target-ppc/translate.c
@@ -120,7 +120,7 @@ void ppc_translate_init(void) @@ -120,7 +120,7 @@ void ppc_translate_init(void)
120 cpu_reg_names_size -= (i < 10) ? 4 : 5; 120 cpu_reg_names_size -= (i < 10) ? 4 : 5;
121 121
122 snprintf(p, cpu_reg_names_size, "avr%dH", i); 122 snprintf(p, cpu_reg_names_size, "avr%dH", i);
123 -#ifdef WORDS_BIGENDIAN 123 +#ifdef HOST_WORDS_BIGENDIAN
124 cpu_avrh[i] = tcg_global_mem_new_i64(TCG_AREG0, 124 cpu_avrh[i] = tcg_global_mem_new_i64(TCG_AREG0,
125 offsetof(CPUState, avr[i].u64[0]), p); 125 offsetof(CPUState, avr[i].u64[0]), p);
126 #else 126 #else
@@ -131,7 +131,7 @@ void ppc_translate_init(void) @@ -131,7 +131,7 @@ void ppc_translate_init(void)
131 cpu_reg_names_size -= (i < 10) ? 6 : 7; 131 cpu_reg_names_size -= (i < 10) ? 6 : 7;
132 132
133 snprintf(p, cpu_reg_names_size, "avr%dL", i); 133 snprintf(p, cpu_reg_names_size, "avr%dL", i);
134 -#ifdef WORDS_BIGENDIAN 134 +#ifdef HOST_WORDS_BIGENDIAN
135 cpu_avrl[i] = tcg_global_mem_new_i64(TCG_AREG0, 135 cpu_avrl[i] = tcg_global_mem_new_i64(TCG_AREG0,
136 offsetof(CPUState, avr[i].u64[1]), p); 136 offsetof(CPUState, avr[i].u64[1]), p);
137 #else 137 #else
target-ppc/translate_init.c
@@ -9388,7 +9388,7 @@ static int gdb_set_float_reg(CPUState *env, uint8_t *mem_buf, int n) @@ -9388,7 +9388,7 @@ static int gdb_set_float_reg(CPUState *env, uint8_t *mem_buf, int n)
9388 static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n) 9388 static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
9389 { 9389 {
9390 if (n < 32) { 9390 if (n < 32) {
9391 -#ifdef WORDS_BIGENDIAN 9391 +#ifdef HOST_WORDS_BIGENDIAN
9392 stq_p(mem_buf, env->avr[n].u64[0]); 9392 stq_p(mem_buf, env->avr[n].u64[0]);
9393 stq_p(mem_buf+8, env->avr[n].u64[1]); 9393 stq_p(mem_buf+8, env->avr[n].u64[1]);
9394 #else 9394 #else
@@ -9411,7 +9411,7 @@ static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n) @@ -9411,7 +9411,7 @@ static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
9411 static int gdb_set_avr_reg(CPUState *env, uint8_t *mem_buf, int n) 9411 static int gdb_set_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
9412 { 9412 {
9413 if (n < 32) { 9413 if (n < 32) {
9414 -#ifdef WORDS_BIGENDIAN 9414 +#ifdef HOST_WORDS_BIGENDIAN
9415 env->avr[n].u64[0] = ldq_p(mem_buf); 9415 env->avr[n].u64[0] = ldq_p(mem_buf);
9416 env->avr[n].u64[1] = ldq_p(mem_buf+8); 9416 env->avr[n].u64[1] = ldq_p(mem_buf+8);
9417 #else 9417 #else
target-sparc/op_helper.c
@@ -385,7 +385,7 @@ void helper_faligndata(void) @@ -385,7 +385,7 @@ void helper_faligndata(void)
385 *((uint64_t *)&DT0) = tmp; 385 *((uint64_t *)&DT0) = tmp;
386 } 386 }
387 387
388 -#ifdef WORDS_BIGENDIAN 388 +#ifdef HOST_WORDS_BIGENDIAN
389 #define VIS_B64(n) b[7 - (n)] 389 #define VIS_B64(n) b[7 - (n)]
390 #define VIS_W64(n) w[3 - (n)] 390 #define VIS_W64(n) w[3 - (n)]
391 #define VIS_SW64(n) sw[3 - (n)] 391 #define VIS_SW64(n) sw[3 - (n)]
tcg/arm/tcg-target.c
@@ -282,7 +282,7 @@ static inline void tcg_out_b(TCGContext *s, int cond, int32_t offset) @@ -282,7 +282,7 @@ static inline void tcg_out_b(TCGContext *s, int cond, int32_t offset)
282 282
283 static inline void tcg_out_b_noaddr(TCGContext *s, int cond) 283 static inline void tcg_out_b_noaddr(TCGContext *s, int cond)
284 { 284 {
285 -#ifdef WORDS_BIGENDIAN 285 +#ifdef HOST_WORDS_BIGENDIAN
286 tcg_out8(s, (cond << 4) | 0x0a); 286 tcg_out8(s, (cond << 4) | 0x0a);
287 s->code_ptr += 3; 287 s->code_ptr += 3;
288 #else 288 #else
@@ -506,7 +506,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c) @@ -506,7 +506,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
506 union { 506 union {
507 uint64_t ll; 507 uint64_t ll;
508 struct { 508 struct {
509 -#ifdef WORDS_BIGENDIAN 509 +#ifdef HOST_WORDS_BIGENDIAN
510 uint32_t high, low; 510 uint32_t high, low;
511 #else 511 #else
512 uint32_t low, high; 512 uint32_t low, high;
@@ -1656,7 +1656,7 @@ static void pixel_format_message (VncState *vs) { @@ -1656,7 +1656,7 @@ static void pixel_format_message (VncState *vs) {
1656 vnc_write_u8(vs, vs->ds->surface->pf.bits_per_pixel); /* bits-per-pixel */ 1656 vnc_write_u8(vs, vs->ds->surface->pf.bits_per_pixel); /* bits-per-pixel */
1657 vnc_write_u8(vs, vs->ds->surface->pf.depth); /* depth */ 1657 vnc_write_u8(vs, vs->ds->surface->pf.depth); /* depth */
1658 1658
1659 -#ifdef WORDS_BIGENDIAN 1659 +#ifdef HOST_WORDS_BIGENDIAN
1660 vnc_write_u8(vs, 1); /* big-endian-flag */ 1660 vnc_write_u8(vs, 1); /* big-endian-flag */
1661 #else 1661 #else
1662 vnc_write_u8(vs, 0); /* big-endian-flag */ 1662 vnc_write_u8(vs, 0); /* big-endian-flag */