purego: improve support of 'arm' architecture - #488
Closed
xakep666 wants to merge 1 commit into
Closed
Conversation
* Properly handle 64-bit integers: 1. Obey 8-byte alignment on stack and even-register placement required by AAPCS. 2. Use two registers (R0, R1) to make function return value. This will work for '386' architecture too. * Support for soft-float ABI: 1. Pull runtime variable 'goarmsoftfp' to detect if soft-float ABI is used. 2. Assembly trampolines skips load/store to FP registers if soft-float is detected. This was implemented in exactly same way how it's done in Go runtime. 3. Apply integer passing rules for float arguments/return values. * Run tests for GOARM=5 (no FPU) in test workflow and add some arm-specific test cases. Co-authored-by: Hirador <63920290+Hirador@users.noreply.github.com>
Member
Create an issue first please. |
Author
Done. One issue for improper argument alignment and one for soft-float support. |
Member
|
Thanks. This PR fixes the two issues at the same time, but can we split the changes? |
Author
|
It is possible. However it's tested together. I've started with soft-float support (found because of SIGILLs) but then found alignment problem. |
Member
Then let's do one by one. Make a separate PR. Thanks, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What issue is this addressing?
Closes #489 (improper alignment)
Closes #490 (soft-float)
What type of issue is this addressing?
Fixes bugs and add feature.
What this PR does | solves
This PR improves support of 'arm' architecture stated as 'Tier 2' in README.
Possible concerns: a way soft-float ABI usage is detected. I've decided to import a variable from 'runtime' package via
//go:linknamein a specific way to ensure that&purego.runtime_goarmsoftfp == &runtime.goarmsoftfp. Last one has//go:linknametoo because it's widely used across assembly routines.Verification: