Commit 7bc45061eee222bd198db8485e2e9364190ff8f1
1 parent
d52fff71
Fix lui sign extension.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2726 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
target-mips/translate.c
| @@ -907,7 +907,7 @@ static void gen_arith_imm (DisasContext *ctx, uint32_t opc, int rt, | @@ -907,7 +907,7 @@ static void gen_arith_imm (DisasContext *ctx, uint32_t opc, int rt, | ||
| 907 | GEN_LOAD_IMM_TN(T1, uimm); | 907 | GEN_LOAD_IMM_TN(T1, uimm); |
| 908 | break; | 908 | break; |
| 909 | case OPC_LUI: | 909 | case OPC_LUI: |
| 910 | - uimm <<= 16; | 910 | + uimm = (int32_t)(imm << 16); |
| 911 | GEN_LOAD_IMM_TN(T0, uimm); | 911 | GEN_LOAD_IMM_TN(T0, uimm); |
| 912 | break; | 912 | break; |
| 913 | case OPC_SLL: | 913 | case OPC_SLL: |