dump sreg, add new ops

This commit is contained in:
2020-09-25 00:39:10 +02:00
parent f7e0998696
commit f652ff6669
7 changed files with 209 additions and 35 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ pub enum Op {
Sub(Wr, Rd),
Mul(Wr, Rd),
Div(Wr, Rd),
Mod(Wr, /*rem*/Wr, Rd),
Mod(Wr, Rd),
DivRem(Wr, /*rem*/Wr, Rd),
// /// Bitwise
And(Wr, Rd),
+7
View File
@@ -131,6 +131,13 @@ pub fn parse_op(keyword: &str, far : bool, mut arg_tokens: impl Iterator<Item=Se
"mod" => {
HLOp::L(Op::Mod(
parse_wr(arg_tokens.next())?,
parse_rd(arg_tokens.next())?
))
}
"divr" => {
HLOp::L(Op::DivRem(
parse_wr(arg_tokens.next())?,
parse_wr(arg_tokens.next())?,
parse_rd(arg_tokens.next())?