|
From: <sv...@va...> - 2013-09-21 01:47:34
|
Author: petarj
Date: Sat Sep 21 01:47:18 2013
New Revision: 2773
Log:
mips32: protect mips32r2 instructions with a flag
Regression issue that came when mips_dirtyhelper_calculate_FCSR was added.
Inline assembly with MIPS32r2 instructions needs to be protected by flags
that disable it for non-MIPS32r2 platforms such as some Broadcom boards.
Fixes the issue: Bugzilla 325124.
Modified:
trunk/priv/guest_mips_helpers.c
Modified: trunk/priv/guest_mips_helpers.c
==============================================================================
--- trunk/priv/guest_mips_helpers.c (original)
+++ trunk/priv/guest_mips_helpers.c Sat Sep 21 01:47:18 2013
@@ -1155,63 +1155,65 @@
case CEILWD:
ASM_VOLATILE_ROUND(fs, ceil.w.d)
break;
- case CEILLS:
- ASM_VOLATILE_ROUND(fs, ceil.l.s)
- break;
- case CEILLD:
- ASM_VOLATILE_ROUND(fs, ceil.l.d)
- break;
- case ROUNDLS:
- ASM_VOLATILE_ROUND(fs, round.l.s)
- break;
- case ROUNDLD:
- ASM_VOLATILE_ROUND(fs, round.l.d)
- break;
- case TRUNCLS:
- ASM_VOLATILE_ROUND(fs, trunc.l.s)
- break;
- case TRUNCLD:
- ASM_VOLATILE_ROUND(fs, trunc.l.d)
- break;
case CVTDS:
ASM_VOLATILE_ROUND(fs, cvt.d.s)
break;
case CVTDW:
ASM_VOLATILE_ROUND(fs, cvt.d.w)
break;
- case CVTDL:
- ASM_VOLATILE_ROUND(fs, cvt.d.l)
- break;
case CVTSW:
ASM_VOLATILE_ROUND(fs, cvt.s.w)
break;
case CVTSD:
ASM_VOLATILE_ROUND(fs, cvt.s.d)
break;
- case CVTSL:
- ASM_VOLATILE_ROUND(fs, cvt.s.l)
- break;
case CVTWS:
ASM_VOLATILE_ROUND(fs, cvt.w.s)
break;
case CVTWD:
ASM_VOLATILE_ROUND(fs, cvt.w.d)
break;
+ case ROUNDWS:
+ ASM_VOLATILE_ROUND(fs, round.w.s)
+ break;
+#if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
+ case CEILLS:
+ ASM_VOLATILE_ROUND(fs, ceil.l.s)
+ break;
+ case CEILLD:
+ ASM_VOLATILE_ROUND(fs, ceil.l.d)
+ break;
+ case CVTDL:
+ ASM_VOLATILE_ROUND(fs, cvt.d.l)
+ break;
case CVTLS:
ASM_VOLATILE_ROUND(fs, cvt.l.s)
break;
case CVTLD:
ASM_VOLATILE_ROUND(fs, cvt.l.d)
break;
+ case CVTSL:
+ ASM_VOLATILE_ROUND(fs, cvt.s.l)
+ break;
case FLOORLS:
ASM_VOLATILE_ROUND(fs, floor.l.s)
break;
case FLOORLD:
ASM_VOLATILE_ROUND(fs, floor.l.d)
break;
- case ROUNDWS:
- ASM_VOLATILE_ROUND(fs, round.w.s)
+ case ROUNDLS:
+ ASM_VOLATILE_ROUND(fs, round.l.s)
break;
+ case ROUNDLD:
+ ASM_VOLATILE_ROUND(fs, round.l.d)
+ break;
+ case TRUNCLS:
+ ASM_VOLATILE_ROUND(fs, trunc.l.s)
+ break;
+ case TRUNCLD:
+ ASM_VOLATILE_ROUND(fs, trunc.l.d)
+ break;
+#endif
default:
vassert(0);
break;
|