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

Add aarch64a_soft_nofp variant #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

keith-packard
Copy link

Build a soft float multilib variant for aarch64 supporting targets without an FPU.

This contains a couple of minor fixes for llvm to enable this; I'll be submitting those upstream.

Copy link
Collaborator

@ostannard ostannard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the LLVM changes, we're trying to minimise the side of our downstream patch, so we'd prefer to wait until these have been committed to LLVM itself.

For the testing, have you checked if QEMU correctly models the undefined instruction exception if a floating-point instruction is executed in this library variant? I did some testing a while ago and couldn't get that to happen, which is why I'm trying to make FVPs usable for testing, since they can accurately model a lot of less-common architectures like this.

- ldp x10,x11, [x0, #0x050]
- ldp x12,x13, [x0, #0x060]
- ldp x14,x15, [x0, #0x070]
+ LDP(x2, x3, x0, #0x010, #0x018)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LDP instructions with X registers should be available without the FPU, is this part of the change needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. I'm not sure why I thought that was necessary. I'll be updating the upstream PR once I've finish testing.

Build a soft float multilib variant for aarch64 supporting targets
without an FPU.

This contains a couple of minor fixes for llvm to enable this; I'll be
submitting those upstream.

Signed-off-by: Keith Packard <[email protected]>
@keith-packard
Copy link
Author

For the LLVM changes, we're trying to minimise the side of our downstream patch, so we'd prefer to wait until these have been committed to LLVM itself.

Makes sense. I'm working on getting those upstream.

For the testing, have you checked if QEMU correctly models the undefined instruction exception if a floating-point instruction is executed in this library variant? I did some testing a while ago and couldn't get that to happen, which is why I'm trying to make FVPs usable for testing, since they can accurately model a lot of less-common architectures like this.

I don't think QEMU has a model for aarch64 without an FPU, so all of my testing uses the full machine. However, my test harness leaves the FPU disabled when testing the nofp code. When it hits an instruction using the FPU, qemu traps.

@keith-packard
Copy link
Author

It would be good to have these changes tested on FVP; I haven't figured out how to do that yet.

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.

2 participants