Skip to content
Snippets Groups Projects
Commit 4651cd2b authored by Alberto Nidasio's avatar Alberto Nidasio Committed by Alberto Nidasio
Browse files

Removed `register` keyword from code

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
parent 84031d73
Loading
Showing
with 56 additions and 56 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment