From 67d888f5c801eeda240508c567775fc1d66ae178 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Tue, 1 Aug 2017 14:13:05 -0700 Subject: [PATCH] RISC-V: Mark "c.nop" as an alias This fixes "-M noaliases" disassembly for "c.nop", which is an alias for "c.addi x0, 0". opcodes/ChangeLog 2017-08-01 Palmer Dabbelt * riscv-opc.c (riscv_opcodes): Mark "c.nop" as an alias. --- opcodes/ChangeLog | 4 ++++ opcodes/riscv-opc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 1ea12bbffda..72fb674d7d5 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2017-08-22 Palmer Dabbelt + + * riscv-opc.c (riscv_opcodes): Mark "c.nop" as an alias. + 2017-08-21 Alexander Fedotov Edmar Wienskoski diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index 9914c447442..70a362859cc 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -619,7 +619,7 @@ const struct riscv_opcode riscv_opcodes[] = {"c.lw", "C", "Ct,Ck(Cs)", MATCH_C_LW, MASK_C_LW, match_opcode, 0 }, {"c.swsp", "C", "CV,CM(Cc)", MATCH_C_SWSP, MASK_C_SWSP, match_opcode, 0 }, {"c.sw", "C", "Ct,Ck(Cs)", MATCH_C_SW, MASK_C_SW, match_opcode, 0 }, -{"c.nop", "C", "", MATCH_C_ADDI, 0xffff, match_opcode, 0 }, +{"c.nop", "C", "", MATCH_C_ADDI, 0xffff, match_opcode, INSN_ALIAS }, {"c.mv", "C", "d,CV", MATCH_C_MV, MASK_C_MV, match_c_add, 0 }, {"c.lui", "C", "d,Cu", MATCH_C_LUI, MASK_C_LUI, match_c_lui, 0 }, {"c.li", "C", "d,Co", MATCH_C_LI, MASK_C_LI, match_rd_nonzero, 0 }, -- 2.30.2