llvm-project
9af3628c - [SystemZ] Fix transparent_union calling convention

Commit
1 year ago
[SystemZ] Fix transparent_union calling convention The SystemZ ABI code was missing code to handle the transparent_union extension. Arguments of such types are specified to be passed like the first member of the union, instead of according to the usual ABI calling convention for aggregates. This did not make much difference in practice as the SystemZ ABI already specifies that 1-, 2-, 4- or 8-byte aggregates are passed in registers. However, there *is* a difference if the first member of the transparent union is a scalar integer type smaller than word size - if passed as a scalar, it needs to be zero- or sign-extended to word size, while if passed as aggregate, it is not. Fixed by adding code to handle transparent_union similar to what is done on other targets.
Author
Parents
Loading