Bug 27348

Summary: obsolete Xcustom support in riscv port
Product: binutils Reporter: Jim Wilson <wilson>
Component: binutilsAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: nelson.chu
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target: riscv*-*-*
Build: Last reconfirmed:

Description Jim Wilson 2021-02-04 21:40:07 UTC
Andrew Waterman removed the Xcustom extension support Oct 11 2016 before the code was upstreamed to the FSF in Nov 2016.
    https://github.com/riscv/riscv-binutils-gdb/commit/36b55f6f846828bf355b02acafba395b3f110246

Unfortunately, he missed all of the Xcustom support in the include/opc/riscv-opc.h file.  It has stuff like
    #define MATCH_CUSTOM0_RS1 0x200b
and
    DECLARE_INSN(custom0_rs1, MATCH_CUSTOM0_RS1, MASK_CUSTOM0_RS1)
which is now useless and should be removed.

I suspect that everything containing the string custom or CUSTOM is obsolete and should be removed.
Comment 1 Sourceware Commits 2021-02-05 03:05:29 UTC
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:

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

commit cb4ff67af365b2d5632359c4c67de0a5e6f60c44
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Fri Feb 5 10:42:31 2021 +0800

    RISC-V: PR27348, Remove obsolete Xcustom support.
    
    include/
        PR 27348
        * opcode/riscv-opc.h: Remove obsolete Xcustom support.
Comment 2 Sourceware Commits 2021-02-05 03:22:07 UTC
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:

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

commit 5f40035fb87b3a98a5834e4fed1e7e9c1f7807e5
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Fri Feb 5 11:12:59 2021 +0800

    RISC-V: PR27348, Remove the obsolete OP_*CUSTOM_IMM.
    
    include/
        PR 27348
        * opcode/riscv.h: Remove obsolete OP_*CUSTOM_IMM.
Comment 3 Nelson Chu 2021-02-05 03:24:33 UTC
Fixed.  The remaining CUSTOM_[0|1|2] are used for .insn directive, so I keep them.  Otherwise, all obsolete Xcustom stuff should be removed.

Nelson
Comment 4 Jim Wilson 2021-02-05 23:45:44 UTC
Mark as resolved/fixed as it is fixed.