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

The thumbv7e-m can combine both soft floating point and hard floating point, this should be represented in configs #34

Open
nathaniel-brough opened this issue Dec 8, 2021 · 0 comments

Comments

@nathaniel-brough
Copy link
Collaborator

The thumbv7e-m, AKA Cortex-M7 device can implement both hard and soft floating-point instructions at the same time. For example, a processor might only implement the single-precision floating-point instructions in hardware required soft floating point libraries to complete double-precision floating-point math.

This is an edge case where Bazel's platform API does not map nicely to the real world. i.e. for a;

constraint_setting(
  name = "fpu",
)

#  Has both single and double precision instructions. Can be implemented entirely in hardware.
constraint_value(
  name = "fpv5_d16",
  constraint_setting = ":fpu",
)

# Has only single precision instructions, double precision math must be implemented in software.
constraint_value(
  name = "fpv5_sp_d16",
  constraint_setting = ":fpu",
)

# Implements floating point math entirely in software.
constraint_value(
  name = "softfp",
  constraint_setting = ":fpu",
)

There can only ever be one constraint_value assigned to that setting at any one time, this means that you cannot enable both hard/soft floating point settings at the same time.

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

1 participant