Skip to content

ARMC6: Use float-abi=hard #9154

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

Merged
merged 1 commit into from
Jan 3, 2019
Merged

ARMC6: Use float-abi=hard #9154

merged 1 commit into from
Jan 3, 2019

Conversation

kjbracey
Copy link
Contributor

Description

For binary compatibility with ARMC5, use the hardfp ABI variant whenever
we have FP hardware - this is ARMC5's default behaviour, which we do not
override.

Cortex-M4F was already using hard; this brings M7F and M33F into line.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

For binary compatibility with ARMC5, use the hard ABI variant whenever
we have FP hardware - this is ARMC5's default behaviour, which we do not
override.

Cortex-M4F was already using hard; this brings M7F and M33F into line.
@kjbracey
Copy link
Contributor Author

See issue #9153 for more discussion. I believe this is a minimal change bringing ARMC6 into line with ARMC5 - but it would be good if someone can cross-check that I've understood what ARMC5 is doing correctly.

As to what the general direction should be, that's maybe a separate issue. We currently have 2 toolchains using hardfp, 1 using softfp...

@cmonr cmonr requested a review from a team December 19, 2018 20:13
@deepikabhavnani
Copy link

Had similar discussion while setting FPU for Cortex-M33, and as per @theotherjimmy we use softfp.
I am not sure if it was for nanostack only or something else. Will have to wait for this till @theotherjimmy is back from vacation (2019)

@kjbracey
Copy link
Contributor Author

Yeah, I saw that discussion, but not any reasoning. I can also imagine either changing M4F to softfp, or changing just M7F to hardfp, depending on what the plan is. It'll have to wait.

@SenRamakri
Copy link
Contributor

SenRamakri commented Dec 21, 2018

I think this is a good change, because it optimizes the function call overhead when we pass many floating point args.
But note that this will not be backward compatible with any libraries currently compiled with softfp. I hope this doesn't break any targets if using any such libraries(with softfp).

@SenRamakri
Copy link
Contributor

@cmonr - Although I approved please wait for @theotherjimmy also to confirm.

@kjbracey
Copy link
Contributor Author

kjbracey commented Jan 2, 2019

But note that this will not be backward compatible with any libraries currently compiled with softfp. I hope this doesn't break any targets if using any such libraries(with softfp).

Actually, I believe this avoids binary compatibility problems - this makes the float ABI the same as we're using with ARMC5 (it defaults to hard if FP is present, and we don't select anything manually, afaict).

So only an issue if you've got precompiled ARMC6 binaries somewhere that you're only using with ARMC6.

@theotherjimmy
Copy link
Contributor

@kjbracey-arm @deepikabhavnani That was mostly GCC I was talking about for softfp. I agree with @kjbracey-arm This change is for the best. Just a second on that approval.

@cmonr
Copy link
Contributor

cmonr commented Jan 3, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 3, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 3, 2019

Test restarted

@cmonr cmonr merged commit 57c2079 into ARMmbed:master Jan 3, 2019
@kjbracey kjbracey deleted the armc6_hardfp branch January 4, 2019 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants