Skip to content
Commit 5b3f8009 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis
Browse files

arch: arm: Ignore Wattributes warning in direct ISR



GCC 11 and above may report the following warning for the functions
declared with the `interrupt` attribute when compiling FPU-enabled
ARM targets:

  warning: FP registers might be clobbered despite 'interrupt'
  attribute: compile with '-mgeneral-regs-only' [-Wattributes]

This commit disables the above warning because:

* For M-profile architectures (Cortex-M), this warning does not apply
  because the caller saved registers, including the FPU registers, are
  automatically saved upon exception entry and the callee saved
  registers are saved by the called functions as per the AAPCS (for
  more details, see the GitHub issue #49631).

* For A- and R-profile architectures (Cortex-A/Cortex-R), this warning
  is not very helpful either because the Zephyr ARM arch implementation
  strictly adheres to the AAPCS and, when applicable, only the caller
  saved registers need be saved upon exception entry.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent 1261a9eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment