Vector3 Interop tests
authorSejong OH <sejooh@microsoft.com>
Mon, 18 Apr 2016 10:31:33 +0000 (03:31 -0700)
committerSejong OH <sejooh@microsoft.com>
Thu, 21 Apr 2016 23:47:11 +0000 (16:47 -0700)
commitdd4388c801e2fb6104a603cad0ab439d4053ae09
tree1d0352226a3187cfa2abfa2e08b68bbee0f0426b
parent7186ed6a413bc9d90f20bcba63fd75bc8c3cdad6
Vector3 Interop tests

The native type of Vector3 is struct {float x,y,z} whose size is 12 bytes. RyuJit uses 16-byte register or stack location to store a Vector3 variable with the assumptions below. New testcases are added to check whether RyuJit properly handle interop cases.

RyuJIt back-end makes two assumptions about Vector3 types.

Assumption1: Vector3 type args passed in registers or on stack is rounded to POINTER_SIZE and hence on 64-bit targets it can be read/written as if it were TYP_SIMD16.

Assumption2: Vector3 args passed in registers (e.g. unix) or on stack have their upper 4-bytes being zero. Similarly Vector3 return type value returned from a method will have its upper 4-bytes zeroed out.
tests/src/JIT/SIMD/CMakeLists.txt [new file with mode: 0755]
tests/src/JIT/SIMD/Vector3Interop.cs [new file with mode: 0755]
tests/src/JIT/SIMD/Vector3Interop_r.csproj [new file with mode: 0644]
tests/src/JIT/SIMD/Vector3Interop_ro.csproj [new file with mode: 0644]
tests/src/JIT/SIMD/Vector3TestNative.cpp [new file with mode: 0755]
tests/src/JIT/SIMD/project.json