Fixed the IRQ_BEGIN/END macros in arm-cr/qk/gnu port#61
Open
mikael-s-persson wants to merge 2 commits into
Open
Fixed the IRQ_BEGIN/END macros in arm-cr/qk/gnu port#61mikael-s-persson wants to merge 2 commits into
mikael-s-persson wants to merge 2 commits into
Conversation
… indirection as in ti port for separating C code from assembly blocks in naked function. Also, updated the VFP instructions to UAL mnemonics, since the GNU compilers I have used (GCC and Clang) have poor and deprecated support for legacy mnemonics and use UAL since around 2011.
Contributor
|
Hi Mikael, |
90a452e to
6e3af9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I fixed the QK_IRQ_BEGIN/END macros in the arm-cr/qk/gnu port. It needed the same indirection as in ti port to separate the C code (incl. user code) from the assembly blocks within the naked function. Mixing C code and assembly in a naked function has always been undefined behavior, and LLVM family of compilers will refuse to compile that, while GCC just screams loudly.
Also, I updated the VFP instructions to unified (UAL) mnemonics, since the GNU compilers I have used (GCC and Clang) have poor, partial and increasingly-deprecated support for legacy mnemonics and requiring UAL support is certainly no more restrictive than requiring C11, since the former much predates the latter, afaik.
I also removed the
__attribute__ ((interrupt ("irq")))which makes no sense for a naked function (and ultimately has no effect, except generating compiler warnings) with a hand-written prologue/epilogue.As far as I know, this should all work (it's the exact same mechanism as in TI port, which I have tested extensively), but I don't really have a hardware setup to test this on (or at least, the setup is not complete yet). All I can say is that the resulting assembly (from objdump-disassembly) is identical between TI and GNU ports when it comes to the ISRs defined with these macros after this change.