Commit f469b9db01a1287ae8946159beace6285c2e213a
1 parent
5d46d55d
Fix slti/sltiu for MIPS64, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2833 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
8 additions
and
8 deletions
target-mips/op.c
... | ... | @@ -928,14 +928,14 @@ void glue(op_, name) (void) \ |
928 | 928 | |
929 | 929 | OP_COND(eq, T0 == T1); |
930 | 930 | OP_COND(ne, T0 != T1); |
931 | -OP_COND(ge, (int32_t)T0 >= (int32_t)T1); | |
931 | +OP_COND(ge, (target_long)T0 >= (target_long)T1); | |
932 | 932 | OP_COND(geu, T0 >= T1); |
933 | -OP_COND(lt, (int32_t)T0 < (int32_t)T1); | |
933 | +OP_COND(lt, (target_long)T0 < (target_long)T1); | |
934 | 934 | OP_COND(ltu, T0 < T1); |
935 | -OP_COND(gez, (int32_t)T0 >= 0); | |
936 | -OP_COND(gtz, (int32_t)T0 > 0); | |
937 | -OP_COND(lez, (int32_t)T0 <= 0); | |
938 | -OP_COND(ltz, (int32_t)T0 < 0); | |
935 | +OP_COND(gez, (target_long)T0 >= 0); | |
936 | +OP_COND(gtz, (target_long)T0 > 0); | |
937 | +OP_COND(lez, (target_long)T0 <= 0); | |
938 | +OP_COND(ltz, (target_long)T0 < 0); | |
939 | 939 | |
940 | 940 | /* Branches */ |
941 | 941 | void OPPROTO op_goto_tb0(void) | ... | ... |
target-mips/translate.c
... | ... | @@ -921,7 +921,7 @@ static void gen_flt_ldst (DisasContext *ctx, uint32_t opc, int ft, |
921 | 921 | static void gen_arith_imm (DisasContext *ctx, uint32_t opc, int rt, |
922 | 922 | int rs, int16_t imm) |
923 | 923 | { |
924 | - uint32_t uimm; | |
924 | + target_ulong uimm; | |
925 | 925 | const char *opn = "imm arith"; |
926 | 926 | |
927 | 927 | if (rt == 0 && opc != OPC_ADDI && opc != OPC_DADDI) { |
... | ... | @@ -941,7 +941,7 @@ static void gen_arith_imm (DisasContext *ctx, uint32_t opc, int rt, |
941 | 941 | #endif |
942 | 942 | case OPC_SLTI: |
943 | 943 | case OPC_SLTIU: |
944 | - uimm = (int32_t)imm; /* Sign extend to 32 bits */ | |
944 | + uimm = (target_long)imm; /* Sign extend to 32/64 bits */ | |
945 | 945 | /* Fall through. */ |
946 | 946 | case OPC_ANDI: |
947 | 947 | case OPC_ORI: | ... | ... |