Commit 6ad3872210a45b6741803bd692ee0c38472d9392

Authored by ths
1 parent 60445285

Force proper sign extension for mfc0/mfhc0 on MIPS64.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3432 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 2 deletions
target-mips/op.c
@@ -2328,7 +2328,7 @@ void op_ctc1 (void) @@ -2328,7 +2328,7 @@ void op_ctc1 (void)
2328 2328
2329 void op_mfc1 (void) 2329 void op_mfc1 (void)
2330 { 2330 {
2331 - T0 = WT0; 2331 + T0 = (int32_t)WT0;
2332 DEBUG_FPU_STATE(); 2332 DEBUG_FPU_STATE();
2333 RETURN(); 2333 RETURN();
2334 } 2334 }
@@ -2356,7 +2356,7 @@ void op_dmtc1 (void) @@ -2356,7 +2356,7 @@ void op_dmtc1 (void)
2356 2356
2357 void op_mfhc1 (void) 2357 void op_mfhc1 (void)
2358 { 2358 {
2359 - T0 = WTH0; 2359 + T0 = (int32_t)WTH0;
2360 DEBUG_FPU_STATE(); 2360 DEBUG_FPU_STATE();
2361 RETURN(); 2361 RETURN();
2362 } 2362 }