Commit 5b3f800
committed
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: Stephanos Ioannidis <root@stephanos.io>1 parent 1261a9e commit 5b3f800
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
0 commit comments