summaryrefslogtreecommitdiffstats
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
authorths2006-12-21 14:48:28 +0100
committerths2006-12-21 14:48:28 +0100
commit5dc4b744806b5f7487989e42a84322fbd5810877 (patch)
tree9694eb3eefb095920f55af4c92b7dd37e9482bb9 /target-mips/op_helper.c
parentPreliminiary MIPS64 support, disabled by default due to performance impact. (diff)
downloadqemu-5dc4b744806b5f7487989e42a84322fbd5810877.tar.gz
qemu-5dc4b744806b5f7487989e42a84322fbd5810877.tar.xz
qemu-5dc4b744806b5f7487989e42a84322fbd5810877.zip
Scrap SIGN_EXTEND32.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2251 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r--target-mips/op_helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index b719f036ab..a518e5ca42 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -167,8 +167,8 @@ static inline uint64_t get_HILO (void)
static inline void set_HILO (uint64_t HILO)
{
- env->LO = SIGN_EXTEND32(HILO & 0xFFFFFFFF);
- env->HI = SIGN_EXTEND32(HILO >> 32);
+ env->LO = (int32_t)(HILO & 0xFFFFFFFF);
+ env->HI = (int32_t)(HILO >> 32);
}
void do_mult (void)
@@ -305,12 +305,12 @@ void cpu_mips_tlb_flush (CPUState *env, int flush_global)
/* CP0 helpers */
void do_mfc0_random (void)
{
- T0 = SIGN_EXTEND32(cpu_mips_get_random(env));
+ T0 = (int32_t)cpu_mips_get_random(env);
}
void do_mfc0_count (void)
{
- T0 = SIGN_EXTEND32(cpu_mips_get_count(env));
+ T0 = (int32_t)cpu_mips_get_count(env);
}
void do_mtc0_status_debug(uint32_t old, uint32_t val)
@@ -433,7 +433,7 @@ static void fill_tlb (int idx)
/* XXX: detect conflicting TLBs and raise a MCHECK exception when needed */
tlb = &env->tlb[idx];
- tlb->VPN = env->CP0_EntryHi & SIGN_EXTEND32(0xFFFFE000);
+ tlb->VPN = env->CP0_EntryHi & (int32_t)0xFFFFE000;
tlb->ASID = env->CP0_EntryHi & 0xFF;
size = env->CP0_PageMask >> 13;
size = 4 * (size + 1);
@@ -478,7 +478,7 @@ void do_tlbp (void)
uint8_t ASID;
int i;
- tag = env->CP0_EntryHi & SIGN_EXTEND32(0xFFFFE000);
+ tag = env->CP0_EntryHi & (int32_t)0xFFFFE000;
ASID = env->CP0_EntryHi & 0xFF;
for (i = 0; i < MIPS_TLB_NB; i++) {
tlb = &env->tlb[i];