Files
sdk/runtime/vm/compiler/ffi/unit_tests/union16bytesHomogenousx10/arm_android.expect
T
Daco Harkes 9d5846b86e [vm/ffi] Support Unions backend
This Splits the NativeCompoundType into NativeStructType and
NativeUnionType.

The calling conventions themselves did not have to be updated at all,
they rely on the 'queries' on NativeTypes.

Some interesting corner cases in the native calling conventions are:
1. Arm64 and arm hardfp still regard unions as homogeneous floats, even
   if the union members are different sizes.
2. Unions can be larger than their members if their largest member has
   a smaller alignment than a smaller member.
3. When a specific range in a struct contains floating points in one
   member, but integers in another, the integers take precedence.

Bug: https://github.com/dart-lang/sdk/issues/38491

tools/build.py run_ffi_unit_tests && tools/test.py ffi_unit
TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=runtime/vm/compiler/ffi/native_type_test.cc
These tests are exercised on vm-precomp-ffi-qemu-linux-release-arm-try.

Change-Id: Ib97769457d1ad0fce47601e9e4a3008bd837167f
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-04-08 17:41:30 +00:00

14 lines
713 B
Plaintext

M(r1 int32, r2 int32, r3 int32, S+0 int32) Union(size: 16)
M(S+4 int32, S+8 int32, S+12 int32, S+16 int32) Union(size: 16)
M(S+20 int32, S+24 int32, S+28 int32, S+32 int32) Union(size: 16)
M(S+36 int32, S+40 int32, S+44 int32, S+48 int32) Union(size: 16)
M(S+52 int32, S+56 int32, S+60 int32, S+64 int32) Union(size: 16)
M(S+68 int32, S+72 int32, S+76 int32, S+80 int32) Union(size: 16)
M(S+84 int32, S+88 int32, S+92 int32, S+96 int32) Union(size: 16)
M(S+100 int32, S+104 int32, S+108 int32, S+112 int32) Union(size: 16)
M(S+116 int32, S+120 int32, S+124 int32, S+128 int32) Union(size: 16)
S+132 int32[int8]
M(S+136 int32, S+140 int32, S+144 int32, S+148 int32) Union(size: 16)
=>
P(r0 uint32) Union(size: 16)