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

Use x30 instead of lr which otherwise trip some versions of gcc #1464

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

torben-hansen
Copy link
Contributor

Description of changes:

Cross-compiling with:

-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-gcc

Resulted in:

Scanning dependencies of target bcm_hashunset
[  6%] Building ASM object crt/aws-lc/crypto/fipsmodule/CMakeFiles/bcm_hashunset.dir/bcm-delocated.S.o
bcm.c: Assembler messages:
bcm.c:15025: Error: operand 2 must be an integer register -- `stp x0,lr,[sp,#-16]!'
bcm.c:15028: Error: operand 2 must be an integer register -- `ldp x0,lr,[sp],#16'
bcm.c:15084: Error: operand 2 must be an integer register -- `stp x0,lr,[sp,#-16]!'
bcm.c:15087: Error: operand 2 must be an integer register -- `ldp x0,lr,[sp],#16'
bcm.c:18003: Error: operand 2 must be an integer register -- `stp x0,lr,[sp,#-16]!'
bcm.c:18006: Error: operand 2 must be an integer register -- `ldp x0,lr,[sp],#16'

Looks like a case of some versions of GCC not liking the link register notation lr being used instead of x30 where an integer register is expected for the instruction.

To recover, use x30 instead of lr in the delocator. Doesn't change behaviour.

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.

@torben-hansen torben-hansen requested a review from a team as a code owner March 1, 2024 08:40
@torben-hansen torben-hansen enabled auto-merge (squash) March 1, 2024 08:41
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.94%. Comparing base (7600809) to head (b4ce81f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1464   +/-   ##
=======================================
  Coverage   76.94%   76.94%           
=======================================
  Files         425      425           
  Lines       71587    71587           
=======================================
+ Hits        55080    55082    +2     
+ Misses      16507    16505    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@torben-hansen torben-hansen merged commit ef6d5a4 into aws:main Mar 1, 2024
38 of 39 checks passed
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.

4 participants