-
For example in interrupts_cortexMx.cpp: ```cpp static unsigned int getProgramCounter() { unsigned int result; // Get program counter when the exception was thrown from stack frame asm volatile("mrs %0, psp \n\t" "add %0, %0, #24 \n\t" "ldr %0, [%0] \n\t":"=r"(result)); return result; } ``` To check differences in the generated code we disassempled the compiled source with and without the keyword, both for O0 and O2 and both for gcc and clang. Only in a couple of cases with O0 and gcc there were some differences in the instructions, but non in the semantics Removed `register` keyword and changed how the stack pointer is copied in `getCurrentFreeStack` function
For example in interrupts_cortexMx.cpp: ```cpp static unsigned int getProgramCounter() { unsigned int result; // Get program counter when the exception was thrown from stack frame asm volatile("mrs %0, psp \n\t" "add %0, %0, #24 \n\t" "ldr %0, [%0] \n\t":"=r"(result)); return result; } ``` To check differences in the generated code we disassempled the compiled source with and without the keyword, both for O0 and O2 and both for gcc and clang. Only in a couple of cases with O0 and gcc there were some differences in the instructions, but non in the semantics Removed `register` keyword and changed how the stack pointer is copied in `getCurrentFreeStack` function
Loading