From f98d33be3af3a8d788aaef37e8fef167b59c81b2 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 14 Feb 2017 15:37:04 -0800 Subject: [PATCH] Add SFENCE.VMA instruction include/ChangeLog: 2017-02-14 Andrew Waterman * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define. (MASK_SFENCE_VMA): Likewise. (sfence_vma): Declare instruction. opcodes/ChangeLog: 2017-02-14 Andrew Waterman * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and pseudoinstructions. --- include/ChangeLog | 6 ++++++ include/opcode/riscv-opc.h | 3 +++ opcodes/ChangeLog | 5 +++++ opcodes/riscv-opc.c | 3 +++ 4 files changed, 17 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index e90166ce1c2..7e59ea21eb2 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2017-02-14 Andrew Waterman + + * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define. + (MASK_SFENCE_VMA): Likewise. + (sfence_vma): Declare instruction. + 2017-02-14 Alan Modra PR 21118 diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index 09d680b90b4..dd580534b01 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -227,6 +227,8 @@ #define MASK_DRET 0xffffffff #define MATCH_SFENCE_VM 0x10400073 #define MASK_SFENCE_VM 0xfff07fff +#define MATCH_SFENCE_VMA 0x12000073 +#define MASK_SFENCE_VMA 0xfe007fff #define MATCH_WFI 0x10500073 #define MASK_WFI 0xffffffff #define MATCH_CSRRW 0x1073 @@ -883,6 +885,7 @@ DECLARE_INSN(hret, MATCH_HRET, MASK_HRET) DECLARE_INSN(mret, MATCH_MRET, MASK_MRET) DECLARE_INSN(dret, MATCH_DRET, MASK_DRET) DECLARE_INSN(sfence_vm, MATCH_SFENCE_VM, MASK_SFENCE_VM) +DECLARE_INSN(sfence_vma, MATCH_SFENCE_VMA, MASK_SFENCE_VMA) DECLARE_INSN(wfi, MATCH_WFI, MASK_WFI) DECLARE_INSN(csrrw, MATCH_CSRRW, MASK_CSRRW) DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4e58d6c9c17..88306985a1b 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2017-02-14 Andrew Waterman + + * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and + pseudoinstructions. + 2017-02-15 Richard Sandiford * aarch64-opc.c (aarch64_sys_regs): Add SVE registers. diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index cc39390ec81..61d01596183 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -678,6 +678,9 @@ const struct riscv_opcode riscv_opcodes[] = {"dret", "I", "", MATCH_DRET, MASK_DRET, match_opcode, 0 }, {"sfence.vm", "I", "", MATCH_SFENCE_VM, MASK_SFENCE_VM | MASK_RS1, match_opcode, 0 }, {"sfence.vm", "I", "s", MATCH_SFENCE_VM, MASK_SFENCE_VM, match_opcode, 0 }, +{"sfence.vma","I", "", MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS1 | MASK_RS2, match_opcode, INSN_ALIAS }, +{"sfence.vma","I", "s", MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS2, match_opcode, INSN_ALIAS }, +{"sfence.vma","I", "s,t", MATCH_SFENCE_VMA, MASK_SFENCE_VMA, match_opcode, 0 }, {"wfi", "I", "", MATCH_WFI, MASK_WFI, match_opcode, 0 }, /* Terminate the list. */ -- 2.30.2