A few steps towards AArch64 & ARM passing the behavior tests #3278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit fixes a nasty problem: sometimes the integer types storage size are different from their effective bit-count (eg.
i1
is 1 byte), on AArch64 we'd sometimes create bigger fields than expected. The commit fixes the problem by codegen'ing those fields as arrays of bytes (clang does the same, check outCGRecordLayoutBuilder
) to avoid any problem.The second commit does jack shit because of Issue with the stack-switching strategy #3268 but at least stops aligning the stack to a multiple of 8 on AArch64 (the stack alignment is 16).
The third commit is needed because of Issue with the stack-switching strategy #3268 and because the ARM backend doesn't lower the
f16
vsf128
comparison.The fourth commit is quite nice, the only reason the test didn't fail on x64 is that
rdi
is always set to a non-zero value before entering the test function and that's accidentally passed through tofunc
. This doesn't happen on ARM tho,r0
is sometimes zero and the test fails.Yes, the
LLVMValueRef
to array conversion is awful but works, if anybody loves stage1 enough to care feel free to rewrite it.