Page MenuHomePhabricator

kc.austin2017 (KCG)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 4 2017, 2:42 PM (130 w, 4 d)

Recent Activity

Dec 5 2017

kc.austin2017 added a comment to D28820: Warn when calling a non interrupt function from an interrupt on ARM.

What is the best way to modify the code for this compiler change ?

Currently, the "interrupt" attribute only has an effect on functions, not function pointers, so your code won't work the way you want. It's a bug that we don't emit a warning for this.

https://bugs.llvm.org/show_bug.cgi?id=35527

Currently, this warning doesn't have its own warning flag, instead being lumped under -Wextra. This is also a bug.

https://bugs.llvm.org/show_bug.cgi?id=35528

We don't emit the warning if your code is compiled for a target which doesn't support floating-point (-mfpu=none or -msoft-float); see https://reviews.llvm.org/D32918. But otherwise, if you're sure your code is actually correct, you can turn off the warning with -Wno-extra or something like that. (The whole thing is kind of awkward because the implementation of the interrupt attribute in clang is buggy: the frontend lies to the backend about the calling convention, so the backend can't save/restore VFP registers correctly.)

https://i.imgur.com/BFRoEUO.gif

so is there any plan to make the "interrupt" attribute not just support on functions?

I'll fix these. Give me a few weeks though.

Dec 5 2017, 8:18 AM

Dec 4 2017

kc.austin2017 added a comment to D28820: Warn when calling a non interrupt function from an interrupt on ARM.

What is the best way to modify the code for this compiler change ?

Currently, the "interrupt" attribute only has an effect on functions, not function pointers, so your code won't work the way you want. It's a bug that we don't emit a warning for this.

Currently, this warning doesn't have its own warning flag, instead being lumped under -Wextra. This is also a bug.

We don't emit the warning if your code is compiled for a target which doesn't support floating-point (-mfpu=none or -msoft-float); see https://reviews.llvm.org/D32918. But otherwise, if you're sure your code is actually correct, you can turn off the warning with -Wno-extra or something like that. (The whole thing is kind of awkward because the implementation of the interrupt attribute in clang is buggy: the frontend lies to the backend about the calling convention, so the backend can't save/restore VFP registers correctly.)

Dec 4 2017, 9:23 PM
kc.austin2017 added a comment to D28820: Warn when calling a non interrupt function from an interrupt on ARM.

Hi , I am looking for some helps on the issue i have in my project after this change for the compiler.

Dec 4 2017, 2:54 PM