forked from AbleOS/ableos
Rename
This commit is contained in:
parent
2d34ed61d0
commit
e700010e7f
|
@ -62,7 +62,7 @@ tokendef![
|
||||||
"nop", "add", "sub", "mul", "and", "or", "xor", "sl", "sr", "srs", "cmp", "cmpu",
|
"nop", "add", "sub", "mul", "and", "or", "xor", "sl", "sr", "srs", "cmp", "cmpu",
|
||||||
"dir", "neg", "not", "addi", "muli", "andi", "ori", "xori", "sli", "sri", "srsi",
|
"dir", "neg", "not", "addi", "muli", "andi", "ori", "xori", "sli", "sri", "srsi",
|
||||||
"cmpi", "cmpui", "cp", "swa", "li", "ld", "st", "bmc", "brc", "jmp", "jeq", "jne",
|
"cmpi", "cmpui", "cp", "swa", "li", "ld", "st", "bmc", "brc", "jmp", "jeq", "jne",
|
||||||
"jlt", "jgt", "jltu", "jgtu", "ecall", "addf", "subf", "mulf", "dirf", "fma", "negf",
|
"jlt", "jgt", "jltu", "jgtu", "ecall", "addf", "subf", "mulf", "dirf", "fmaf", "negf",
|
||||||
"itf", "fti", "addfi", "mulfi",
|
"itf", "fti", "addfi", "mulfi",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ enum hbbc_Opcode: uint8_t {
|
||||||
hbbc_Op_CMPUI , hbbc_Op_CP , hbbc_Op_SWA , hbbc_Op_LI , hbbc_Op_LD , hbbc_Op_ST ,
|
hbbc_Op_CMPUI , hbbc_Op_CP , hbbc_Op_SWA , hbbc_Op_LI , hbbc_Op_LD , hbbc_Op_ST ,
|
||||||
hbbc_Op_BMC , hbbc_Op_BRC , hbbc_Op_JMP , hbbc_Op_JEQ , hbbc_Op_JNE , hbbc_Op_JLT ,
|
hbbc_Op_BMC , hbbc_Op_BRC , hbbc_Op_JMP , hbbc_Op_JEQ , hbbc_Op_JNE , hbbc_Op_JLT ,
|
||||||
hbbc_Op_JGT , hbbc_Op_JLTU , hbbc_Op_JGTU , hbbc_Op_ECALL , hbbc_Op_ADDF , hbbc_Op_SUBF ,
|
hbbc_Op_JGT , hbbc_Op_JLTU , hbbc_Op_JGTU , hbbc_Op_ECALL , hbbc_Op_ADDF , hbbc_Op_SUBF ,
|
||||||
hbbc_Op_MULF , hbbc_Op_DIRF , hbbc_Op_FMA , hbbc_Op_NEGF , hbbc_Op_ITF , hbbc_Op_FTI ,
|
hbbc_Op_MULF , hbbc_Op_DIRF , hbbc_Op_FMAF , hbbc_Op_NEGF , hbbc_Op_ITF , hbbc_Op_FTI ,
|
||||||
hbbc_Op_ADDFI , hbbc_Op_MULFI ,
|
hbbc_Op_ADDFI , hbbc_Op_MULFI ,
|
||||||
} typedef hbbc_Opcode;
|
} typedef hbbc_Opcode;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ constmod!(pub opcode(u8) {
|
||||||
SUBF = 41, "BBB; #0 ← #1 -. #2";
|
SUBF = 41, "BBB; #0 ← #1 -. #2";
|
||||||
MULF = 42, "BBB; #0 ← #1 +. #2";
|
MULF = 42, "BBB; #0 ← #1 +. #2";
|
||||||
DIRF = 43, "BBBB; #0 ← #2 / #3, #1 ← #2 % #3";
|
DIRF = 43, "BBBB; #0 ← #2 / #3, #1 ← #2 % #3";
|
||||||
FMA = 44, "BBBB; #0 ← (#1 * #2) + #3";
|
FMAF = 44, "BBBB; #0 ← (#1 * #2) + #3";
|
||||||
NEGF = 45, "BB; #0 ← -#1";
|
NEGF = 45, "BB; #0 ← -#1";
|
||||||
ITF = 46, "BB; #0 ← #1 as float";
|
ITF = 46, "BB; #0 ← #1 as float";
|
||||||
FTI = 47, "BB; #0 ← #1 as int";
|
FTI = 47, "BB; #0 ← #1 as int";
|
||||||
|
|
|
@ -284,7 +284,7 @@ impl<'a, T: HandleTrap> Vm<'a, T> {
|
||||||
self.write_reg(dt, a0 / a1);
|
self.write_reg(dt, a0 / a1);
|
||||||
self.write_reg(rt, a0 % a1);
|
self.write_reg(rt, a0 % a1);
|
||||||
}
|
}
|
||||||
FMA => {
|
FMAF => {
|
||||||
let ParamBBBB(dt, a0, a1, a2) = param!(self, ParamBBBB);
|
let ParamBBBB(dt, a0, a1, a2) = param!(self, ParamBBBB);
|
||||||
self.write_reg(
|
self.write_reg(
|
||||||
dt,
|
dt,
|
||||||
|
|
Loading…
Reference in a new issue