Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few steps towards AArch64 & ARM passing the behavior tests #3278

Merged
merged 4 commits into from Sep 21, 2019

Conversation

LemonBoy
Copy link
Contributor

  • 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 out CGRecordLayoutBuilder) 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 vs f128 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 to func. 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.

@andrewrk andrewrk merged commit f3a7c34 into ziglang:master Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants