From 2f2a9b109cb6180d09f2554e82384e2e52fc3a87 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Thu, 28 Jun 2018 01:00:33 -0700 Subject: JIT: fix bug returning small structs on linux x64 (#18563) The jit was retyping all calls with small struct returns as power of two sized ints when generating code for linux x64 and arm32/arm64. When the results of those calls were assigned to fields the jit would use overly wide stores which could corrupt neighboring fields. The fix is to keep better track of the smallest power of two enclosing int type size for the struct. If this exactly matches the struct size then the the result of the call can be used in an arbitrary context. If the enclosing type is larger, the call's result must be copied to a temp and then the temp can be reinterpreted as the struct for subsequent uses. Defer retyping inline candidates and tail call candidates. Then handle deferred updates for cases where calls don't get inlined. Add test cases for 6 byte structs showing the various situations the jit must handle: callee is not an inline candidate, is an inline candidate and gets inlined, or inline candidate that does not get inlined. Add a 3 byte test case to get coverage on arm32. Add new tests to the arm32/arm64 test lists. --- tests/arm/Tests.lst | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'tests/arm') diff --git a/tests/arm/Tests.lst b/tests/arm/Tests.lst index 9e96a1eb99..db556779e9 100644 --- a/tests/arm/Tests.lst +++ b/tests/arm/Tests.lst @@ -94740,3 +94740,67 @@ MaxAllowedDurationSeconds=600 Categories=EXPECTED_PASS HostStyle=0 +[GitHub_18522.cmd_11903] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522\GitHub_18522.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_1.cmd_11904] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_1\GitHub_18522_1.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_1 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_2.cmd_11905] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_2\GitHub_18522_2.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_2 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_3.cmd_11906] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_3\GitHub_18522_3.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_3 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_4.cmd_11907] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_4\GitHub_18522_4.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_4 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_5.cmd_11908] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_5\GitHub_18522_5.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_5 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_6.cmd_11909] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_6\GitHub_18522_6.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_6 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + +[GitHub_18522_7.cmd_11910] +RelativePath=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_7\GitHub_18522_7.cmd +WorkingDir=JIT\Regression\JitBlue\GitHub_18522\GitHub_18522_7 +Expected=0 +MaxAllowedDurationSeconds=600 +Categories=EXPECTED_PASS +HostStyle=0 + -- cgit v1.2.3