diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-25 16:41:11 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-25 16:41:11 +0000 |
commit | d6929309b689264755963fe5ee18767a7f1c4af5 (patch) | |
tree | ab5a1683910598407dda5c58d1eab01e493b9199 /target-mips | |
parent | 7bc45061eee222bd198db8485e2e9364190ff8f1 (diff) | |
download | hqemu-d6929309b689264755963fe5ee18767a7f1c4af5.zip hqemu-d6929309b689264755963fe5ee18767a7f1c4af5.tar.gz |
Next attempt to get the lui sign extension right.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2727 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/op_template.c | 2 | ||||
-rw-r--r-- | target-mips/translate.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/target-mips/op_template.c b/target-mips/op_template.c index 8d4c4e4..04677cd 100644 --- a/target-mips/op_template.c +++ b/target-mips/op_template.c @@ -54,7 +54,7 @@ void glue(op_load_gpr_T2_gpr, REG) (void) #define SET_RESET(treg, tregname) \ void glue(op_set, tregname)(void) \ { \ - treg = PARAM1; \ + treg = (int32_t)PARAM1; \ RETURN(); \ } \ void glue(op_reset, tregname)(void) \ diff --git a/target-mips/translate.c b/target-mips/translate.c index 96a0f37..06581f2 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -907,8 +907,7 @@ static void gen_arith_imm (DisasContext *ctx, uint32_t opc, int rt, GEN_LOAD_IMM_TN(T1, uimm); break; case OPC_LUI: - uimm = (int32_t)(imm << 16); - GEN_LOAD_IMM_TN(T0, uimm); + GEN_LOAD_IMM_TN(T0, uimm << 16); break; case OPC_SLL: case OPC_SRA: |