Following this question: Similar MIPS assembler behavior with jump (and link) instruction I have a working binding to build GNU for my MIPS project with one loop (no delay delay for branching!). I would rather write in C, though. The code generated by the compiler itself starts, but I have to manually edit the assembly source every time, because GCC for some reason likes to automatically reorder branch instructions. I don't want to hack this with a script to figure out when to reorder branches again.
Is there any way around this? For some reason, GCC generates code as follows:
.set noreorder ... jr $ra <-- GCC reordered for me! addi $v0, $v0, 10 <-- ... .set reorder
where I really want to pass assembler something like this:
.set noreorder addi $v0, $v0, 10 jr $ra
source share