Open tge-was-taken opened 3 years ago
To provide further context, this code uses the EABI64 ABI in single float mode, which is described as follows:
I8/I16 arguments promoted to I32
Integer arguments are passed in integer registers: $a0, $a1, $a2, $a3, $t0 ($a4), $t1 ($a5), $t2 ($a6), $t3 ($a7)
If single float mode, single FP arguments are passed in pairs within 32-bit mode: $f12, $f13, $f14, $f15, $f16, $f17, $f18, $f19
otherwise: $f12, $f14, $f16, $f18
If not single float mode, the first 4 double fp arguments are passed in single FP registers: $d6, $d7, $d8, $d9
I32, F32 values get stored in stack slots that are 4 bytes in size and 4-byte aligned
F64 values get stored in stack slots that are 8 bytes in size and 8-byte aligned
I32 are returned in registers: $v0, $v1
F32 are returned in registers: $f0, $f1
If not single float mode, F64 are returned in register: $d0
Argument registers are considered "unset" despite the given function prototype.
Context
Assembly (ee-gcc)
mips_to_c output