Fix FIPS delocator handling of floating-point immediates on aarch64#3029
Merged
Fix FIPS delocator handling of floating-point immediates on aarch64#3029
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3029 +/- ##
==========================================
- Coverage 78.35% 78.34% -0.02%
==========================================
Files 689 689
Lines 121010 121010
Branches 16992 16990 -2
==========================================
- Hits 94813 94800 -13
- Misses 25302 25314 +12
- Partials 895 896 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nebeid
approved these changes
Feb 24, 2026
dkostic
approved these changes
Feb 24, 2026
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.
Issues:
Addresses #3028
Description of changes:
When GCC 15 compiles the FIPS module at
-O3on aarch64, it emitsfmovinstructions with floating-point immediates (e.g.fmov v8.4s, #2.0e+0). The delocator's PEG grammar only supports integer immediates, so it parses#2.0e+0as the integer#2followed by what it thinks is a symbol reference.0e. This gets turned into a redirector (.Lbcm_redirector_.0e), producing invalid assembly.This change fixes the issue in two ways:
RegisterOrConstantrule indelocate.peg, so values like#2.0e+0are parsed as a single token.fmovto the special-case instruction list inprocessAarch64Instruction(). Sincefmovonly operates on registers and immediates (never memory), it never needs delocating and can safely be written through unchanged.The GCC 15 + FIPS exclusion in
arm-gcc-testsCI is also removed now that the underlying issue is resolved.Call-outs:
The
delocate.peg.gofile is regenerated from the grammar using thepegtool. The grammar change is the one line indelocate.peg; the rest of that file is mechanical.Testing:
testdata/aarch64-Basic/in.scovering float immediates with exponent notation, simple decimals, negative values, fractional values, scalar forms, and register-to-registerfmov.arm-gcc-testsCI matrix entry for GCC 15 + FIPS on arm64 which will validate the end-to-end build.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.