ARM64: Fix Storing PSPSym for localloc
authorKyungwoo Lee <kyulee@microsoft.com>
Fri, 15 Apr 2016 15:45:34 +0000 (08:45 -0700)
committerKyungwoo Lee <kyulee@microsoft.com>
Sat, 16 Apr 2016 13:03:46 +0000 (06:03 -0700)
JIT incorrectly saves/restores PSPSym causing AVs in EH tests that have localloc with filter.
The fix is to use a right opcode (Load instead of Store) when saving PSPSym.

src/jit/codegenarm64.cpp
src/jit/codegenxarch.cpp
tests/arm64/Tests.lst

index 5fe911c..911d8d7 100644 (file)
@@ -3698,7 +3698,7 @@ CodeGen::genLclHeap(GenTreePtr tree)
         regMaskTP pspSymRegMask = genFindLowestBit(tmpRegsMask);
         tmpRegsMask &= ~pspSymRegMask;
         pspSymReg = genRegNumFromMask(pspSymRegMask);
-        getEmitter()->emitIns_R_S(ins_Store(TYP_I_IMPL), EA_PTRSIZE, pspSymReg, compiler->lvaPSPSym, 0);
+        getEmitter()->emitIns_R_S(ins_Load(TYP_I_IMPL), EA_PTRSIZE, pspSymReg, compiler->lvaPSPSym, 0);
     }
 #endif
 
index 8e2482f..50b3f53 100644 (file)
@@ -2898,7 +2898,7 @@ CodeGen::genLclHeap(GenTreePtr tree)
         regMaskTP pspSymRegMask = genFindLowestBit(tmpRegsMask);
         tmpRegsMask &= ~pspSymRegMask;
         pspSymReg = genRegNumFromMask(pspSymRegMask);
-        getEmitter()->emitIns_R_S(ins_Store(TYP_I_IMPL), EA_PTRSIZE, pspSymReg, compiler->lvaPSPSym, 0);
+        getEmitter()->emitIns_R_S(ins_Load(TYP_I_IMPL), EA_PTRSIZE, pspSymReg, compiler->lvaPSPSym, 0);
     }
 #endif
 
index 06af06c..56ff447 100644 (file)
@@ -11288,21 +11288,21 @@ RelativePath=JIT\jit64\localloc\eh\eh03_dynamic\eh03_dynamic.cmd
 WorkingDir=JIT\jit64\localloc\eh\eh03_dynamic
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh03_large.cmd_1640]
 RelativePath=JIT\jit64\localloc\eh\eh03_large\eh03_large.cmd
 WorkingDir=JIT\jit64\localloc\eh\eh03_large
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh03_small.cmd_1641]
 RelativePath=JIT\jit64\localloc\eh\eh03_small\eh03_small.cmd
 WorkingDir=JIT\jit64\localloc\eh\eh03_small
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh04_dynamic.cmd_1642]
 RelativePath=JIT\jit64\localloc\eh\eh04_dynamic\eh04_dynamic.cmd
@@ -11456,42 +11456,42 @@ RelativePath=JIT\jit64\localloc\ehverify\eh12_dynamic\eh12_dynamic.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh12_dynamic
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh12_large.cmd_1664]
 RelativePath=JIT\jit64\localloc\ehverify\eh12_large\eh12_large.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh12_large
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh12_small.cmd_1665]
 RelativePath=JIT\jit64\localloc\ehverify\eh12_small\eh12_small.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh12_small
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_PASS;DBG_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh13_dynamic.cmd_1666]
 RelativePath=JIT\jit64\localloc\ehverify\eh13_dynamic\eh13_dynamic.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh13_dynamic
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh13_large.cmd_1667]
 RelativePath=JIT\jit64\localloc\ehverify\eh13_large\eh13_large.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh13_large
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [eh13_small.cmd_1668]
 RelativePath=JIT\jit64\localloc\ehverify\eh13_small\eh13_small.cmd
 WorkingDir=JIT\jit64\localloc\ehverify\eh13_small
 Expected=0
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_PASS;DBG_FAIL
+Categories=Pri0;EXPECTED_PASS
 HostStyle=0
 [unwind01_dynamic.cmd_1669]
 RelativePath=JIT\jit64\localloc\unwind\unwind01_dynamic\unwind01_dynamic.cmd