Merged
Conversation
Member
|
Looks good, I will do some modifications, but I will merge it as is |
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.
Description
This change tries to fix issue #260.
This change adds support for the ASM node, only when it has inputs & outputs, to detect what register size it will need and chooses largest size requirement amongst the inputs and outputs to avoid mixed-width instructions. It defaults to a 32-bit register size if it can't detect that it definitely needs 64-bit or 128-bit. If it detects a 128-bit requirement (TYPE_x128) Zen C will error that this is unsupported. This change applies to ARM64 where C compilers can output a warning when using a 64-bit register where a 32-bit register is sufficient by ensuring we choose a 64-bit register only if it's necessary. For all other architectures (x64, x86, arm32) it uses the previous notation.
In
get_asm_register_size(Type *t), I didn't include aTYPE_STRUCTname check fordoubledue tois_float_typenot doing it. I kept the name checks forint64_tanduint64_tbecauseis_integer_typedoes this.As a new contributor, I'm keen to hear if this the desired solution to the problem.
Type of change
Checklist: