pico-sdk
pico-sdk copied to clipboard
Convert all assembly including inline to `.syntax unified`
The majority of our .S files use unified syntax, however very little inline assembler does.
This can lead to bugs, e.g. this
__force_inline static int32_t __mul_instruction(int32_t a, int32_t b) {
asm ("mul %0, %1" : "+l" (a) : "l" (b) : );
return a;
}
which is actually a muls instruction, and sets the flags, so the condition codes need to be added to the clobbers.
We can't/shouldn't change the default inline assembly syntax to unified since this is really the purview of the user. instead we should just explicitly set it on all inline assembly.