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

What are the differences between armv8.1m libraries #446

Open
SeanMeng0509 opened this issue Jun 6, 2024 · 2 comments
Open

What are the differences between armv8.1m libraries #446

SeanMeng0509 opened this issue Jun 6, 2024 · 2 comments

Comments

@SeanMeng0509
Copy link

Following up #301 with LLVM-ET-Arm-18.1.3-Linux-x86_64

Using -mcpu=cortex-m85 -mfloat-abi=hard, multilib system picks armv8.1m.main_hard_fpdp_nomve. We are not sure it is the best choice for Cotex-M85 device that has a FPU compliant with the ANSI/IEEE Std 754-2008 scalar half, single, and double-precision floating-point operation, and supports MVE/MVE-F.

Could you help to explain the detailed differences between these libraries?

armv8.1m.main_hard_fpdp_nomve   armv8.1m.main_hard_fp_nomve  armv8.1m.main_hard_nofp_mve armv8.1m.main_soft_nofp_nomve
@smithp35
Copy link
Contributor

smithp35 commented Jun 6, 2024

These map on to different compiler command line-options. I would expect armv8.1m.main_hard_fpdp_nomve to be the best choice unless you know your programs are integer only.

We don't currently build an all in armv8.1m.main_hard_fpdp_mve option at the moment. Our expectation is that the opportunity for use of MVE in the scalar C-library is small so we didn't think the extra variants were worth the additional build and test time. A quick scan of the code for the C-library with MVE show that it does get used in a small number of places, but unless your code actually uses these library functions it is unlikely to see any difference in performance/code-size. Obviously if there is any floating point used then the library with hardware floating point support will do a lot better.

armv8.1m.main_hard_fpdp_nomve
Enables both single and double precision hardware floating point instructions. Passes floating point parameters in floating-point/simd registers. Does not enable the MVE instructions (largely so this can be compatible with configurations with and without MVE).

armv8.1m.main_hard_fp_nomve
As above but only single precision floating point is enabled, double precision is done using software emulation. This is only useful for configurations without double precision hardware.

armv8.1m.main_hard_nofp_mve
Floating point parameters are passed in simd registers, but all floating point operations are done in software. This option is for "integer-only" MVE. Some benefit can be gained by using the additional MVE registers (the hard-float calling convention), but there is no floating point hardware.

armv8.1m.main_soft_nofp_nomve
This is for configurations with no floating point and no MVE. Only core-registers are available so floating point values have to be passed in core-registers and all floating point operations done in software.

@SeanMeng0509
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants