aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-27 16:13:06 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:09:21 -0500
commite2542fe2bce6756948dffe2d233d154a9e25bd35 (patch)
tree187b840091116d420116fb2627e48afa25d59563 /target-ppc
parentf0667e660720cf2aee4c58716a7a9337bc359a31 (diff)
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/op_helper.c30
-rw-r--r--target-ppc/translate.c4
-rw-r--r--target-ppc/translate_init.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index c352aa71bd..ad6d8ee9b2 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -1921,7 +1921,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_
/*****************************************************************************/
/* Altivec extension helpers */
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define HI_IDX 0
#define LO_IDX 1
#else
@@ -1929,7 +1929,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_
#define LO_IDX 0
#endif
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define VECTOR_FOR_INORDER_I(index, element) \
for (index = 0; index < ARRAY_SIZE(r->element); index++)
#else
@@ -2055,7 +2055,7 @@ STVE(stvewx, stl, bswap32, u32)
void helper_mtvscr (ppc_avr_t *r)
{
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
env->vscr = r->u32[3];
#else
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)
} \
*r = result; \
}
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define MRGHI 0
#define MRGLO 1
#else
@@ -2583,7 +2583,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
int i;
VECTOR_FOR_INORDER_I (i, u8) {
int s = c->u8[i] & 0x1f;
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
int index = s & 0xf;
#else
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)
*r = result;
}
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define PKBIG 1
#else
#define PKBIG 0
@@ -2606,7 +2606,7 @@ void helper_vpkpx (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
{
int i, j;
ppc_avr_t result;
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
const ppc_avr_t *x[2] = { a, b };
#else
const ppc_avr_t *x[2] = { b, a };
@@ -2723,7 +2723,7 @@ void helper_vlogefp (ppc_avr_t *r, ppc_avr_t *b)
}
}
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define LEFT 0
#define RIGHT 1
#else
@@ -2783,7 +2783,7 @@ void helper_vsldoi (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shift)
int i;
ppc_avr_t result;
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
for (i = 0; i < ARRAY_SIZE(r->u8); i++) {
int index = sh + i;
if (index > 0xf) {
@@ -2809,7 +2809,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
{
int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf;
-#if defined (WORDS_BIGENDIAN)
+#if defined (HOST_WORDS_BIGENDIAN)
memmove (&r->u8[0], &a->u8[sh], 16-sh);
memset (&r->u8[16-sh], 0, sh);
#else
@@ -2820,7 +2820,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
/* Experimental testing shows that hardware masks the immediate. */
#define _SPLAT_MASKED(element) (splat & (ARRAY_SIZE(r->element) - 1))
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define SPLAT_ELEMENT(element) _SPLAT_MASKED(element)
#else
#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)
{
int sh = (b->u8[LO_IDX*0xf] >> 3) & 0xf;
-#if defined (WORDS_BIGENDIAN)
+#if defined (HOST_WORDS_BIGENDIAN)
memmove (&r->u8[sh], &a->u8[0], 16-sh);
memset (&r->u8[0], 0, sh);
#else
@@ -2901,7 +2901,7 @@ void helper_vsumsws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
ppc_avr_t result;
int sat = 0;
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
upper = ARRAY_SIZE(r->s32)-1;
#else
upper = 0;
@@ -2925,7 +2925,7 @@ void helper_vsum2sws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
ppc_avr_t result;
int sat = 0;
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
upper = 1;
#else
upper = 0;
@@ -2997,7 +2997,7 @@ void helper_vsum4ubs (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
}
}
-#if defined(WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN)
#define UPKHI 1
#define UPKLO 0
#else
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index da3d7de8a7..58818c2118 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -120,7 +120,7 @@ void ppc_translate_init(void)
cpu_reg_names_size -= (i < 10) ? 4 : 5;
snprintf(p, cpu_reg_names_size, "avr%dH", i);
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
cpu_avrh[i] = tcg_global_mem_new_i64(TCG_AREG0,
offsetof(CPUState, avr[i].u64[0]), p);
#else
@@ -131,7 +131,7 @@ void ppc_translate_init(void)
cpu_reg_names_size -= (i < 10) ? 6 : 7;
snprintf(p, cpu_reg_names_size, "avr%dL", i);
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
cpu_avrl[i] = tcg_global_mem_new_i64(TCG_AREG0,
offsetof(CPUState, avr[i].u64[1]), p);
#else
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 3b6e2d5044..1731d12ed6 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -9388,7 +9388,7 @@ static int gdb_set_float_reg(CPUState *env, uint8_t *mem_buf, int n)
static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
{
if (n < 32) {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
stq_p(mem_buf, env->avr[n].u64[0]);
stq_p(mem_buf+8, env->avr[n].u64[1]);
#else
@@ -9411,7 +9411,7 @@ static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
static int gdb_set_avr_reg(CPUState *env, uint8_t *mem_buf, int n)
{
if (n < 32) {
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
env->avr[n].u64[0] = ldq_p(mem_buf);
env->avr[n].u64[1] = ldq_p(mem_buf+8);
#else