• R
    clean up mips64/n32 syscall asm constraints · ddc7c4f9
    Rich Felker 提交于
    ever since inline syscalls were added for (o32) mips in commit
    328810d3, the asm has nonsensically
    loaded the syscall number, rather than taking $2 as an input
    constraint to let the compiler load it. commit
    cfc09b1e improved on this somewhat by
    allowing a constant syscall number to propagate into an immediate, but
    missed that the whole operation made no sense.
    
    now, only $4, $5, $6, $8, and $9 are potential input-only registers.
    $2 is always input and output, and $7 is both when it's an argument,
    otherwise output-only. previously, $7 was treated as an input (with a
    "1" constraint matching its output position) even when it was not an
    input, which was arguably undefined behavior (asm input from
    indeterminate value). this is corrected.
    ddc7c4f9
syscall_arch.h 3.6 KB