From 7923dd632ea78fe2b7c80b908a8f2d86e6711454 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Wed, 25 Sep 2019 19:13:36 +0800 Subject: [PATCH] riscv64,exec: add fence.i --- src/isa/riscv64/exec/all-instr.h | 1 + src/isa/riscv64/exec/exec.c | 2 +- src/isa/riscv64/exec/special.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/isa/riscv64/exec/all-instr.h b/src/isa/riscv64/exec/all-instr.h index 1b5e3963..dc5b73d6 100644 --- a/src/isa/riscv64/exec/all-instr.h +++ b/src/isa/riscv64/exec/all-instr.h @@ -25,6 +25,7 @@ make_EHelper(bne); make_EHelper(inv); make_EHelper(nemu_trap); +make_EHelper(fence); make_EHelper(csrrw); make_EHelper(csrrs); diff --git a/src/isa/riscv64/exec/exec.c b/src/isa/riscv64/exec/exec.c index 157f34ba..7089eddb 100644 --- a/src/isa/riscv64/exec/exec.c +++ b/src/isa/riscv64/exec/exec.c @@ -65,7 +65,7 @@ static make_EHelper(system) { } static OpcodeEntry opcode_table [32] = { - /* b00 */ IDEX(ld, load), EMPTY, EMPTY, EMPTY, IDEX(I, op_imm), IDEX(U, auipc), IDEX(I, op_imm32), EMPTY, + /* b00 */ IDEX(ld, load), EMPTY, EMPTY, EX(fence), IDEX(I, op_imm), IDEX(U, auipc), IDEX(I, op_imm32), EMPTY, /* b01 */ IDEX(st, store), EMPTY, EMPTY, EMPTY, IDEX(R, op), IDEX(U, lui), IDEX(R, op32), EMPTY, /* b10 */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, /* b11 */ IDEX(B, branch), IDEX(I, jalr), EX(nemu_trap), IDEX(J, jal), EX(system), EMPTY, EMPTY, EMPTY, diff --git a/src/isa/riscv64/exec/special.c b/src/isa/riscv64/exec/special.c index f89cc6e2..6ee53a1f 100644 --- a/src/isa/riscv64/exec/special.c +++ b/src/isa/riscv64/exec/special.c @@ -27,3 +27,5 @@ make_EHelper(nemu_trap) { print_asm("nemu trap"); return; } + +make_EHelper(fence) { } -- GitLab