aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/main.c2
-rw-r--r--android/skin/image.c4
-rw-r--r--audio/audio.h2
-rw-r--r--bswap.h4
-rw-r--r--console.c8
-rw-r--r--cpu-all.h12
-rw-r--r--cpu-defs.h2
-rw-r--r--disas.c2
-rw-r--r--fpu/softfloat.h2
-rw-r--r--hw/bt-hci.c2
-rw-r--r--hw/goldfish_fb.c8
-rw-r--r--loader.c4
-rw-r--r--slirp-android/ip.h6
-rw-r--r--slirp-android/slirp_config.h2
-rw-r--r--slirp-android/tcp.h2
-rw-r--r--slirp/ip.h6
-rw-r--r--slirp/slirp_config.h2
-rw-r--r--slirp/tcp.h2
-rw-r--r--target-arm/neon_helper.c2
-rw-r--r--tcg/arm/tcg-target.c2
-rw-r--r--vl-android.c2
-rw-r--r--vl.c2
-rw-r--r--vnc-android.c2
-rw-r--r--vnc.c2
24 files changed, 42 insertions, 42 deletions
diff --git a/android/main.c b/android/main.c
index f00e1da..0b967f5 100644
--- a/android/main.c
+++ b/android/main.c
@@ -217,7 +217,7 @@ sdl_set_window_icon( void )
for ( ; d < d_end; d++ ) {
unsigned pix = d[0];
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
/* R,G,B,A read as RGBA => ARGB */
pix = ((pix >> 8) & 0xffffff) | (pix << 24);
#else
diff --git a/android/skin/image.c b/android/skin/image.c
index 051fc6d..789c308 100644
--- a/android/skin/image.c
+++ b/android/skin/image.c
@@ -41,7 +41,7 @@ sdl_surface_from_argb32( void* base, int w, int h )
{
return SDL_CreateRGBSurfaceFrom(
base, w, h, 32, w*4,
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
#else
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
@@ -315,7 +315,7 @@ skin_image_load( SkinImage* image )
for ( ; d < d_end; d++ ) {
unsigned pix = d[0];
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
/* R,G,B,A read as RGBA => ARGB */
pix = ((pix >> 8) & 0xffffff) | (pix << 24);
#else
diff --git a/audio/audio.h b/audio/audio.h
index 208a811..ee923e4 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -39,7 +39,7 @@ typedef enum {
AUD_FMT_S32
} audfmt_e;
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
#define AUDIO_HOST_ENDIANNESS 1
#else
#define AUDIO_HOST_ENDIANNESS 0
diff --git a/bswap.h b/bswap.h
index 1dd357e..90bd66f 100644
--- a/bswap.h
+++ b/bswap.h
@@ -81,7 +81,7 @@ static inline void bswap64s(uint64_t *s)
*s = bswap64(*s);
}
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define be_bswap(v, size) (v)
#define le_bswap(v, size) bswap ## size(v)
#define be_bswaps(v, size)
@@ -203,7 +203,7 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
#endif
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
#define cpu_to_32wu cpu_to_be32wu
#else
#define cpu_to_32wu cpu_to_le32wu
diff --git a/console.c b/console.c
index 52e3e57..d55e0fd 100644
--- a/console.c
+++ b/console.c
@@ -307,7 +307,7 @@ static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w,
(((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
(((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
#define PAT(x) x
#else
#define PAT(x) cbswap_32(x)
@@ -1559,7 +1559,7 @@ DisplaySurface* defaultallocator_create_displaysurface(int width, int height)
surface->height = height;
surface->linesize = width * 4;
surface->pf = qemu_default_pixelformat(32);
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
#else
surface->flags = QEMU_ALLOCATED_FLAG;
@@ -1580,7 +1580,7 @@ DisplaySurface* defaultallocator_resize_displaysurface(DisplaySurface *surface,
surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height);
else
surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height);
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
#else
surface->flags = QEMU_ALLOCATED_FLAG;
@@ -1598,7 +1598,7 @@ DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
surface->height = height;
surface->linesize = linesize;
surface->pf = qemu_default_pixelformat(bpp);
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
surface->flags = QEMU_BIG_ENDIAN_FLAG;
#endif
surface->data = data;
diff --git a/cpu-all.h b/cpu-all.h
index 48a9a2c..f0fd76b 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -28,7 +28,7 @@
* WORDS_ALIGNED : if defined, the host cpu can only make word aligned
* memory accesses.
*
- * WORDS_BIGENDIAN : if defined, the host cpu is big endian and
+ * HOST_WORDS_BIGENDIAN : if defined, the host cpu is big endian and
* otherwise little endian.
*
* (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
@@ -38,7 +38,7 @@
#include "softfloat.h"
-#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
#define BSWAP_NEEDED
#endif
@@ -124,7 +124,7 @@ typedef union {
endian ! */
typedef union {
float64 d;
-#if defined(WORDS_BIGENDIAN) \
+#if defined(HOST_WORDS_BIGENDIAN) \
|| (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
struct {
uint32_t upper;
@@ -142,7 +142,7 @@ typedef union {
#ifdef TARGET_SPARC
typedef union {
float128 q;
-#if defined(WORDS_BIGENDIAN) \
+#if defined(HOST_WORDS_BIGENDIAN) \
|| (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
struct {
uint32_t upmost;
@@ -222,7 +222,7 @@ static inline void stb_p(void *ptr, int v)
/* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the
kernel handles unaligned load/stores may give better results, but
it is a system wide setting : bad */
-#if defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
+#if defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
/* conservative code for little endian unaligned accesses */
static inline int lduw_le_p(const void *ptr)
@@ -399,7 +399,7 @@ static inline void stfq_le_p(void *ptr, float64 v)
}
#endif
-#if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
+#if !defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
static inline int lduw_be_p(const void *ptr)
{
diff --git a/cpu-defs.h b/cpu-defs.h
index e57064f..9518d47 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -109,7 +109,7 @@ typedef struct CPUTLBEntry {
sizeof(target_phys_addr_t))];
} CPUTLBEntry;
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
typedef struct icount_decr_u16 {
uint16_t high;
uint16_t low;
diff --git a/disas.c b/disas.c
index af5a9ea..ce342bc 100644
--- a/disas.c
+++ b/disas.c
@@ -246,7 +246,7 @@ void disas(FILE *out, void *code, unsigned long size)
disasm_info.buffer_vma = (unsigned long)code;
disasm_info.buffer_length = size;
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
disasm_info.endian = BFD_ENDIAN_BIG;
#else
disasm_info.endian = BFD_ENDIAN_LITTLE;
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index c31e62f..9d82694 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -146,7 +146,7 @@ typedef struct {
#endif
#ifdef FLOAT128
typedef struct {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
uint64_t high, low;
#else
uint64_t low, high;
diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index a5902b0..7837d9e 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -421,7 +421,7 @@ static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *dat
* be continuously allocated. We do it though, to preserve similar
* behaviour between hosts. Some things, like the BD_ADDR cannot be
* preserved though (for example if a real hci is used). */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
# define HNDL(raw) bswap16(raw)
#else
# define HNDL(raw) (raw)
diff --git a/hw/goldfish_fb.c b/hw/goldfish_fb.c
index 4a0e335..d092fe4 100644
--- a/hw/goldfish_fb.c
+++ b/hw/goldfish_fb.c
@@ -196,7 +196,7 @@ static void goldfish_fb_update_display(void *opaque)
for (nn = 0; nn < width; nn++) {
unsigned spix = src[nn];
unsigned dpix = dst[nn];
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
spix = ((spix << 8) | (spix >> 8)) & 0xffff;
#else
if (spix != dpix)
@@ -207,7 +207,7 @@ static void goldfish_fb_update_display(void *opaque)
if (nn == width)
continue;
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
for ( ; nn < width; nn++ ) {
unsigned spix = src[nn];
dst[nn] = (uint16_t)((spix << 8) | (spix >> 8));
@@ -229,7 +229,7 @@ static void goldfish_fb_update_display(void *opaque)
uint16_t* src = (uint16_t*) src_line;
uint16_t* dst = (uint16_t*) dst_line;
int len = width*2;
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
int nn;
#endif
int dirty = 0;
@@ -248,7 +248,7 @@ static void goldfish_fb_update_display(void *opaque)
if (!dirty)
continue;
-#if WORDS_BIGENDIAN
+#if HOST_WORDS_BIGENDIAN
for (nn = 0; nn < width; nn++ ) {
unsigned spix = src[nn];
dst[nn] = (uint16_t)((spix << 8) | (spix >> 8));
diff --git a/loader.c b/loader.c
index 9350c54..52d72c5 100644
--- a/loader.c
+++ b/loader.c
@@ -322,7 +322,7 @@ int load_elf(const char *filename, int64_t address_offset,
e_ident[2] != ELFMAG2 ||
e_ident[3] != ELFMAG3)
goto fail;
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
data_order = ELFDATA2MSB;
#else
data_order = ELFDATA2LSB;
@@ -356,7 +356,7 @@ int load_elf(const char *filename, int64_t address_offset,
static void bswap_uboot_header(uboot_image_header_t *hdr)
{
-#ifndef WORDS_BIGENDIAN
+#ifndef HOST_WORDS_BIGENDIAN
bswap32s(&hdr->ih_magic);
bswap32s(&hdr->ih_hcrc);
bswap32s(&hdr->ih_time);
diff --git a/slirp-android/ip.h b/slirp-android/ip.h
index c0ecc55..5b53c03 100644
--- a/slirp-android/ip.h
+++ b/slirp-android/ip.h
@@ -35,7 +35,7 @@
#include "helper.h"
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
# ifndef NTOHL
# define NTOHL(d)
# endif
@@ -75,7 +75,7 @@ typedef u_int32_t n_long; /* long as received from the net */
* Structure of an internet header, naked of options.
*/
struct ip {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int ip_v:4; /* version */
u_int ip_hl:4; /* header length */
#else
@@ -141,7 +141,7 @@ struct ip_timestamp {
u_int8_t ipt_code; /* IPOPT_TS */
u_int8_t ipt_len; /* size of structure (variable) */
u_int8_t ipt_ptr; /* index of current entry */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
#else
diff --git a/slirp-android/slirp_config.h b/slirp-android/slirp_config.h
index 8e95b7c..79cbc72 100644
--- a/slirp-android/slirp_config.h
+++ b/slirp-android/slirp_config.h
@@ -86,7 +86,7 @@
#undef HAVE_SYS_BITYPES_H
/* Define if the machine is big endian */
-//#undef WORDS_BIGENDIAN
+//#undef HOST_WORDS_BIGENDIAN
/* Define if your sprintf returns char * instead of int */
#undef BAD_SPRINTF
diff --git a/slirp-android/tcp.h b/slirp-android/tcp.h
index ee02342..3883d80 100644
--- a/slirp-android/tcp.h
+++ b/slirp-android/tcp.h
@@ -58,7 +58,7 @@ struct tcphdr {
port_t th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */
#else
diff --git a/slirp/ip.h b/slirp/ip.h
index 7a7a9b9..63e18a6 100644
--- a/slirp/ip.h
+++ b/slirp/ip.h
@@ -33,7 +33,7 @@
#ifndef _IP_H_
#define _IP_H_
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
# ifndef NTOHL
# define NTOHL(d)
# endif
@@ -73,7 +73,7 @@ typedef u_int32_t n_long; /* long as received from the net */
* Structure of an internet header, naked of options.
*/
struct ip {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int ip_v:4, /* version */
ip_hl:4; /* header length */
#else
@@ -139,7 +139,7 @@ struct ip_timestamp {
u_int8_t ipt_code; /* IPOPT_TS */
u_int8_t ipt_len; /* size of structure (variable) */
u_int8_t ipt_ptr; /* index of current entry */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
#else
diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h
index dbc8dfd..2ee3c9c 100644
--- a/slirp/slirp_config.h
+++ b/slirp/slirp_config.h
@@ -86,7 +86,7 @@
#undef HAVE_SYS_BITYPES_H
/* Define if the machine is big endian */
-//#undef WORDS_BIGENDIAN
+//#undef HOST_WORDS_BIGENDIAN
/* Define if your sprintf returns char * instead of int */
#undef BAD_SPRINTF
diff --git a/slirp/tcp.h b/slirp/tcp.h
index 4057032..d00c489 100644
--- a/slirp/tcp.h
+++ b/slirp/tcp.h
@@ -52,7 +52,7 @@ struct tcphdr {
u_int16_t th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */
#else
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 35fbaf5..f32ecd6 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -49,7 +49,7 @@ typedef struct \
{ \
type v1; \
} neon_##name;
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
#define NEON_TYPE2(name, type) \
typedef struct \
{ \
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 8139da1..7b6750a 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -269,7 +269,7 @@ static inline void tcg_out_b(TCGContext *s, int cond, int32_t offset)
static inline void tcg_out_b_noaddr(TCGContext *s, int cond)
{
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
tcg_out8(s, (cond << 4) | 0x0a);
s->code_ptr += 3;
#else
diff --git a/vl-android.c b/vl-android.c
index 9faf8c3..008ee7a 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -817,7 +817,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
union {
uint64_t ll;
struct {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
uint32_t high, low;
#else
uint32_t low, high;
diff --git a/vl.c b/vl.c
index ba6ae5d..19f5b52 100644
--- a/vl.c
+++ b/vl.c
@@ -722,7 +722,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
union {
uint64_t ll;
struct {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
uint32_t high, low;
#else
uint32_t low, high;
diff --git a/vnc-android.c b/vnc-android.c
index 2d5063d..66f1753 100644
--- a/vnc-android.c
+++ b/vnc-android.c
@@ -1662,7 +1662,7 @@ static void pixel_format_message (VncState *vs) {
vnc_write_u8(vs, vs->ds->surface->pf.bits_per_pixel); /* bits-per-pixel */
vnc_write_u8(vs, vs->ds->surface->pf.depth); /* depth */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
vnc_write_u8(vs, 1); /* big-endian-flag */
#else
vnc_write_u8(vs, 0); /* big-endian-flag */
diff --git a/vnc.c b/vnc.c
index de0ff87..dfcf34c 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1656,7 +1656,7 @@ static void pixel_format_message (VncState *vs) {
vnc_write_u8(vs, vs->ds->surface->pf.bits_per_pixel); /* bits-per-pixel */
vnc_write_u8(vs, vs->ds->surface->pf.depth); /* depth */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
vnc_write_u8(vs, 1); /* big-endian-flag */
#else
vnc_write_u8(vs, 0); /* big-endian-flag */