This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] RISC-V: Mark "c.nop" as an alias


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=67d888f5c801eeda240508c567775fc1d66ae178

commit 67d888f5c801eeda240508c567775fc1d66ae178
Author: Palmer Dabbelt <palmer@dabbelt.com>
Date:   Tue Aug 1 14:13:05 2017 -0700

    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  <palmer@dabbelt.com>
    
            * riscv-opc.c (riscv_opcodes): Mark "c.nop" as an alias.

Diff:
---
 opcodes/ChangeLog   | 4 ++++
 opcodes/riscv-opc.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1ea12bb..72fb674 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-22  Palmer Dabbelt  <palmer@dabbelt.com>
+
+	* riscv-opc.c (riscv_opcodes): Mark "c.nop" as an alias.
+
 2017-08-21  Alexander Fedotov <alexander.fedotov@nxp.com>
 	    Edmar Wienskoski <edmar.wienskoski@nxp.com>
 
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 9914c44..70a3628 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 },


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]