This commit is contained in:
parent
3301cf5542
commit
e833268061
1 changed files with 10 additions and 0 deletions
|
@ -50,5 +50,15 @@ func (f *Compiler) ValueToRegister(instr ssa.Value, destination cpu.Register) {
|
|||
Destination: destination,
|
||||
Source: source,
|
||||
})
|
||||
|
||||
case *ssa.Syscall:
|
||||
if destination == f.CPU.Return[0] {
|
||||
return
|
||||
}
|
||||
|
||||
f.Assembler.Append(&asm.MoveRegisterRegister{
|
||||
Destination: destination,
|
||||
Source: f.CPU.Return[0],
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue