[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

Chris Copeland via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 21:42:53 PDT 2024


chrisnc wrote:

While doing some more research and comparing `gcc` and `clang`, I noticed that `clang` doesn't even save the volatile fp registers in an interrupt handler when it uses them directly, so there's no point in just checking for function calls. `gcc` does except for `fpscr`, which it will still clobber if floating-point conditionals are computed. Maybe the behavior was different when this warning was introduced, but as of now, using fp at all in an interrupt handler will clobber vfp state, so I think the right path here is to just implement `-Wattributes` in essentially the same way `gcc` does...

https://github.com/llvm/llvm-project/pull/91870


More information about the cfe-commits mailing list