Commit bc1ad2decd3e5caeca90c09382b0a99e1c8d011e
1 parent
83fcb515
MIPS FPU support in linux user emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1967 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
34 deletions
linux-user/main.c
... | ... | @@ -1327,7 +1327,6 @@ void cpu_loop(CPUMIPSState *env) |
1327 | 1327 | arg5, |
1328 | 1328 | arg6); |
1329 | 1329 | } |
1330 | - fail: | |
1331 | 1330 | env->PC += 4; |
1332 | 1331 | if ((unsigned int)ret >= (unsigned int)(-1133)) { |
1333 | 1332 | env->gpr[7] = 1; /* error flag */ |
... | ... | @@ -1342,39 +1341,10 @@ void cpu_loop(CPUMIPSState *env) |
1342 | 1341 | break; |
1343 | 1342 | case EXCP_CpU: |
1344 | 1343 | case EXCP_RI: |
1345 | - { | |
1346 | - uint32_t insn, op; | |
1347 | - | |
1348 | - insn = tget32(env->PC); | |
1349 | - op = insn >> 26; | |
1350 | - // printf("insn=%08x op=%02x\n", insn, op); | |
1351 | - /* XXX: totally dummy FP ops just to be able to launch | |
1352 | - a few executables */ | |
1353 | - switch(op) { | |
1354 | - case 0x31: /* LWC1 */ | |
1355 | - env->PC += 4; | |
1356 | - break; | |
1357 | - case 0x39: /* SWC1 */ | |
1358 | - env->PC += 4; | |
1359 | - break; | |
1360 | - case 0x11: | |
1361 | - switch((insn >> 21) & 0x1f) { | |
1362 | - case 0x02: /* CFC1 */ | |
1363 | - env->PC += 4; | |
1364 | - break; | |
1365 | - default: | |
1366 | - goto sigill; | |
1367 | - } | |
1368 | - break; | |
1369 | - default: | |
1370 | - sigill: | |
1371 | - info.si_signo = TARGET_SIGILL; | |
1372 | - info.si_errno = 0; | |
1373 | - info.si_code = 0; | |
1374 | - queue_signal(info.si_signo, &info); | |
1375 | - break; | |
1376 | - } | |
1377 | - } | |
1344 | + info.si_signo = TARGET_SIGILL; | |
1345 | + info.si_errno = 0; | |
1346 | + info.si_code = 0; | |
1347 | + queue_signal(info.si_signo, &info); | |
1378 | 1348 | break; |
1379 | 1349 | default: |
1380 | 1350 | // error: |
... | ... | @@ -1700,6 +1670,9 @@ int main(int argc, char **argv) |
1700 | 1670 | env->gpr[i] = regs->regs[i]; |
1701 | 1671 | } |
1702 | 1672 | env->PC = regs->cp0_epc; |
1673 | +#ifdef MIPS_USES_FPU | |
1674 | + env->CP0_Status |= (1 << CP0St_CU1); | |
1675 | +#endif | |
1703 | 1676 | } |
1704 | 1677 | #elif defined(TARGET_SH4) |
1705 | 1678 | { | ... | ... |