StrongerXi / soc

Compiler for a subset of OCaml
1 stars 0 forks source link

Fix arg regs #47

Closed StrongerXi closed 3 years ago

StrongerXi commented 3 years ago

See f3a94f9, I'm surprised that this didn't raise any bug.

In retrospect, I think it's because adding callee-saved regs into caller-saved regs doesn't really affect correctness (they are just used for normal coloring anyway). On the other hand, if the bug was the other way around, things would break because the abused caller-saved regs might get assigned to temps that live across call, but they could get clobbered.