Add a return_reg instruction to the base instruction set.
Register-style return is used by all RISC architectures, so it is natural to have a shared instruction representation.
This commit is contained in:
@@ -239,6 +239,13 @@ fn write_instruction(w: &mut Write,
|
||||
writeln!(w, " {}", data.varargs)
|
||||
}
|
||||
}
|
||||
ReturnReg { ref data, .. } => {
|
||||
if data.varargs.is_empty() {
|
||||
writeln!(w, "{}", data.arg)
|
||||
} else {
|
||||
writeln!(w, "{}, {}", data.arg, data.varargs)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user