sw: bootrom: Remove jump workaround

With the naked attribute, this no longer causes gcc to push stuff onto the stack.
This commit is contained in:
Markus Koch 2025-01-30 20:18:44 +01:00
parent bd3eeb0ca2
commit 2b63e7d4ec

View File

@ -49,8 +49,7 @@ __attribute__((noreturn, naked)) void main() {
case 5: // Address
ptr = (uint8_t*)sr;
if (opcode == 3) { // Jump
//((void (*)()) ptr)();
asm("jalr %0" : : "r"(ptr)); // Not sure why, but the jump above causes GCC to save variables to the stack at the beginning of this function
((void (*)()) ptr)();
__builtin_unreachable();
}
break;