summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKyungwoo Lee <kyulee@microsoft.com>2016-03-01 09:33:13 -0800
committerKyungwoo Lee <kyulee@microsoft.com>2016-03-02 10:13:22 -0800
commit445a810039d0801d099fd5ba543876456b248c47 (patch)
tree2294b740b801df48e6b16b6f1f9e8120a3fadc89 /tests
parent9c8484734621f36d2e4113644e56109cb76192e3 (diff)
downloadcoreclr-445a810039d0801d099fd5ba543876456b248c47.tar.gz
coreclr-445a810039d0801d099fd5ba543876456b248c47.tar.bz2
coreclr-445a810039d0801d099fd5ba543876456b248c47.zip
ARM64: Fix for Multiplication with Overflow Check
For 4 byte integer multiplication, JIT emits a bad-code which is valid only for 8 byte (i8) multiplication. For the fix, I use ```smull```(signed)/```umull```(unsigned) instructions that contain 8 byte results from 4 byte by 4 byte multiplication. So only one multiplication is needed instead of two for this case. By simply shifting the results, we could get the upper results that is used to detect overflow. Similar transform is made for the unsigned case. Lower is also changed to reserve a register for overflow check. Before smulh w10, w8, w9 --> Incorrect use: smulh is for obtaining the upper bits [127:64] of x8 * x9 mul w8, w8, w9 cmp x10, x8, ASR #63 After smull x8, x8, x9 --> x8 = w8 * w9 lsr x10, x8, #32 --> shift the upper bit of x8 to get sign bit cmp w10, w8, ASR #31 --> check sign bit
Diffstat (limited to 'tests')
-rw-r--r--tests/arm64/Tests.lst2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/arm64/Tests.lst b/tests/arm64/Tests.lst
index e32b91ce46..56a6daea7b 100644
--- a/tests/arm64/Tests.lst
+++ b/tests/arm64/Tests.lst
@@ -5247,7 +5247,7 @@ WorkingDir=JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b32093\b32093
MaxAllowedDurationSeconds=600
HostStyle=Any
Expected=100
-Categories=JIT;EXPECTED_FAIL;NEED_TRIAGE
+Categories=JIT;EXPECTED_PASS
[lclfldrem_cs_ro.exe_2875]
RelativePath=JIT\Directed\coverage\oldtests\lclfldrem_cs_ro\lclfldrem_cs_ro.exe
WorkingDir=JIT\Directed\coverage\oldtests\lclfldrem_cs_ro