提交 fe8ab5da 编写于 作者: Z Zihao Yu

riscv64,exec: add more amo instructions

上级 beb9d0c1
...@@ -58,3 +58,5 @@ make_EHelper(amoswap); ...@@ -58,3 +58,5 @@ make_EHelper(amoswap);
make_EHelper(amoadd); make_EHelper(amoadd);
make_EHelper(amoor); make_EHelper(amoor);
make_EHelper(amoand); make_EHelper(amoand);
make_EHelper(amomaxu);
make_EHelper(amoxor);
...@@ -61,3 +61,17 @@ make_EHelper(amoand) { ...@@ -61,3 +61,17 @@ make_EHelper(amoand) {
amo_update(); amo_update();
print_asm_template3(amoand); print_asm_template3(amoand);
} }
make_EHelper(amomaxu) {
amo_load();
s1 = (s0 > id_src2->val ? s0 : id_src2->val);
amo_update();
print_asm_template3(amomaxu);
}
make_EHelper(amoxor) {
amo_load();
rtl_xor(&s1, &s0, &id_src2->val);
amo_update();
print_asm_template3(amoxor);
}
...@@ -72,7 +72,7 @@ static make_EHelper(atomic) { ...@@ -72,7 +72,7 @@ static make_EHelper(atomic) {
EMPTY, EX(amoswap), EX(lr), EX(sc) EMPTY, EX(amoswap), EX(lr), EX(sc)
}; };
static OpcodeEntry table_hi [8] = { static OpcodeEntry table_hi [8] = {
EX(amoadd), EMPTY, EX(amoor), EX(amoand), EMPTY, EMPTY, EMPTY, EMPTY EX(amoadd), EX(amoxor), EX(amoor), EX(amoand), EMPTY, EMPTY, EMPTY, EX(amomaxu)
}; };
decinfo.width = 1 << decinfo.isa.instr.funct3; decinfo.width = 1 << decinfo.isa.instr.funct3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册