mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
f0667e6607
commit
e2542fe2bc
+4
-4
@@ -234,7 +234,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),mips)
|
||||
ifeq ($(WORDS_BIGENDIAN),yes)
|
||||
ifeq ($(HOST_WORDS_BIGENDIAN),y)
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
else
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
|
||||
@@ -242,7 +242,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),mips64)
|
||||
ifeq ($(WORDS_BIGENDIAN),yes)
|
||||
ifeq ($(HOST_WORDS_BIGENDIAN),y)
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
else
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
|
||||
@@ -377,7 +377,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),mips)
|
||||
ifeq ($(WORDS_BIGENDIAN),yes)
|
||||
ifeq ($(HOST_WORDS_BIGENDIAN),y)
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
else
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
|
||||
@@ -385,7 +385,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),mips64)
|
||||
ifeq ($(WORDS_BIGENDIAN),yes)
|
||||
ifeq ($(HOST_WORDS_BIGENDIAN),y)
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
else
|
||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
|
||||
|
||||
+1
-1
@@ -38,7 +38,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1528,8 +1528,8 @@ if test "$strip_opt" = "yes" ; then
|
||||
echo "STRIP_OPT=-s" >> $config_host_mak
|
||||
fi
|
||||
if test "$bigendian" = "yes" ; then
|
||||
echo "WORDS_BIGENDIAN=yes" >> $config_host_mak
|
||||
echo "#define WORDS_BIGENDIAN 1" >> $config_host_h
|
||||
echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak
|
||||
echo "#define HOST_WORDS_BIGENDIAN 1" >> $config_host_h
|
||||
fi
|
||||
echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h
|
||||
if test "$mingw32" = "yes" ; then
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -27,7 +27,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))
|
||||
@@ -37,7 +37,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
|
||||
|
||||
@@ -123,7 +123,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;
|
||||
@@ -141,7 +141,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;
|
||||
@@ -221,7 +221,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)
|
||||
@@ -398,7 +398,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)
|
||||
{
|
||||
|
||||
+1
-1
@@ -106,7 +106,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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
# error unknown bit depth
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
# define SWAP_WORDS 1
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -419,7 +419,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)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#define ldebug(...)
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define GUS_ENDIANNESS 1
|
||||
#else
|
||||
#define GUS_ENDIANNESS 0
|
||||
|
||||
@@ -152,7 +152,7 @@ static void glue(draw_line12_, DEPTH)(void *opaque,
|
||||
static void glue(draw_line16_, DEPTH)(void *opaque,
|
||||
uint8_t *d, const uint8_t *s, int width, int deststep)
|
||||
{
|
||||
#if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
#if DEPTH == 16 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
memcpy(d, s, width * 2);
|
||||
#else
|
||||
uint16_t v;
|
||||
|
||||
+3
-3
@@ -95,18 +95,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[36] =
|
||||
|
||||
#if ORDER == 0
|
||||
#define NAME glue(glue(lblp_, BORDER), BITS)
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define SWAP_WORDS 1
|
||||
#endif
|
||||
#elif ORDER == 1
|
||||
#define NAME glue(glue(bbbp_, BORDER), BITS)
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#ifndef HOST_WORDS_BIGENDIAN
|
||||
#define SWAP_WORDS 1
|
||||
#endif
|
||||
#else
|
||||
#define SWAP_PIXELS 1
|
||||
#define NAME glue(glue(lbbp_, BORDER), BITS)
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define SWAP_WORDS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# error unknown bit depth
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
# define SWAP_WORDS 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -74,19 +74,19 @@ const uint8_t gr_mask[16] = {
|
||||
(((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
|
||||
(((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define PAT(x) cbswap_32(x)
|
||||
#else
|
||||
#define PAT(x) (x)
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define BIG 1
|
||||
#else
|
||||
#define BIG 0
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define GET_PLANE(data, p) (((data) >> (24 - (p) * 8)) & 0xff)
|
||||
#else
|
||||
#define GET_PLANE(data, p) (((data) >> ((p) * 8)) & 0xff)
|
||||
@@ -113,7 +113,7 @@ static const uint32_t mask16[16] = {
|
||||
|
||||
#undef PAT
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
#define PAT(x) (x)
|
||||
#else
|
||||
#define PAT(x) cbswap_32(x)
|
||||
@@ -1369,7 +1369,7 @@ static void vga_draw_text(VGAState *s, int full_update)
|
||||
if (cx > cx_max)
|
||||
cx_max = cx;
|
||||
*ch_attr_ptr = ch_attr;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
ch = ch_attr >> 8;
|
||||
cattr = ch_attr & 0xff;
|
||||
#else
|
||||
@@ -1632,7 +1632,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
||||
disp_width != s->last_width ||
|
||||
height != s->last_height ||
|
||||
s->last_depth != depth) {
|
||||
#if defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
#if defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
if (depth == 16 || depth == 32) {
|
||||
#else
|
||||
if (depth == 32) {
|
||||
@@ -1641,7 +1641,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
||||
s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth,
|
||||
s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4));
|
||||
#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
|
||||
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
|
||||
s->ds->surface->pf = qemu_different_endianness_pixelformat(depth);
|
||||
#endif
|
||||
dpy_resize(s->ds);
|
||||
|
||||
+3
-3
@@ -417,7 +417,7 @@ void glue(vga_draw_cursor_line_, DEPTH)(uint8_t *d1,
|
||||
static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
|
||||
const uint8_t *s, int width)
|
||||
{
|
||||
#if DEPTH == 15 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
#if DEPTH == 15 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
memcpy(d, s, width * 2);
|
||||
#else
|
||||
int w;
|
||||
@@ -442,7 +442,7 @@ static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
|
||||
static void glue(vga_draw_line16_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
|
||||
const uint8_t *s, int width)
|
||||
{
|
||||
#if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
#if DEPTH == 16 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
|
||||
memcpy(d, s, width * 2);
|
||||
#else
|
||||
int w;
|
||||
@@ -493,7 +493,7 @@ static void glue(vga_draw_line24_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
|
||||
static void glue(vga_draw_line32_, PIXEL_NAME)(VGAState *s1, uint8_t *d,
|
||||
const uint8_t *s, int width)
|
||||
{
|
||||
#if DEPTH == 32 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) && !defined(BGR_FORMAT)
|
||||
#if DEPTH == 32 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) && !defined(BGR_FORMAT)
|
||||
memcpy(d, s, width * 4);
|
||||
#else
|
||||
int w;
|
||||
|
||||
@@ -150,7 +150,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)
|
||||
case MNF_CODE:
|
||||
{
|
||||
unsigned int *p = (unsigned int*)&rFm;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
p[0] ^= 0x80000000;
|
||||
#else
|
||||
p[1] ^= 0x80000000;
|
||||
@@ -162,7 +162,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)
|
||||
case ABS_CODE:
|
||||
{
|
||||
unsigned int *p = (unsigned int*)&rFm;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
p[0] &= 0x7fffffff;
|
||||
#else
|
||||
p[1] &= 0x7fffffff;
|
||||
|
||||
@@ -44,7 +44,7 @@ void loadDouble(const unsigned int Fn, target_ulong addr)
|
||||
unsigned int *p;
|
||||
p = (unsigned int*)&fpa11->fpreg[Fn].fDouble;
|
||||
fpa11->fType[Fn] = typeDouble;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
/* FIXME - handle failure of get_user() */
|
||||
get_user_u32(p[0], addr); /* sign & exponent */
|
||||
get_user_u32(p[1], addr + 4);
|
||||
@@ -147,7 +147,7 @@ void storeDouble(const unsigned int Fn, target_ulong addr)
|
||||
default: val = fpa11->fpreg[Fn].fDouble;
|
||||
}
|
||||
/* FIXME - handle put_user() failures */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
put_user_u32(p[0], addr); /* msw */
|
||||
put_user_u32(p[1], addr + 4); /* lsw */
|
||||
#else
|
||||
|
||||
@@ -324,7 +324,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;
|
||||
@@ -358,7 +358,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);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user