Add SFENCE.VMA instruction
authorAndrew Waterman <andrew@sifive.com>
Tue, 14 Feb 2017 23:37:04 +0000 (15:37 -0800)
committerPalmer Dabbelt <palmer@dabbelt.com>
Wed, 15 Feb 2017 18:35:00 +0000 (10:35 -0800)
include/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
        (MASK_SFENCE_VMA): Likewise.
        (sfence_vma): Declare instruction.

opcodes/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
        pseudoinstructions.

include/ChangeLog
include/opcode/riscv-opc.h
opcodes/ChangeLog
opcodes/riscv-opc.c

index e90166ce1c2f84d54290d608ee8e1765dc525291..7e59ea21eb27ecea66e52ebc3348e57fc3e732ab 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+       * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
+       (MASK_SFENCE_VMA): Likewise.
+       (sfence_vma): Declare instruction.
+
 2017-02-14  Alan Modra  <amodra@gmail.com>
 
        PR 21118
index 09d680b90b466a741f8b24f9acd0854a1fdf0da6..dd580534b01ab820a3da5c5d0681b03d951c09c0 100644 (file)
 #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)
index 4e58d6c9c1702bd0622103fe9f4327b6ee7c91ee..88306985a1bf0ad68608fb1d44a433763790b91e 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+       * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
+       pseudoinstructions.
+
 2017-02-15  Richard Sandiford  <richard.sandiford@arm.com>
 
        * aarch64-opc.c (aarch64_sys_regs): Add SVE registers.
index cc39390ec815f2062ce5f2149143bab22a6a3b5c..61d01596183388a940e3b7aee6144eead01abce6 100644 (file)
@@ -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.  */