]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Implment N modifier for printing the register number rather than the register...
authorKito Cheng <kito.cheng@sifive.com>
Thu, 14 Nov 2024 09:24:45 +0000 (17:24 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 17 Dec 2024 14:28:05 +0000 (22:28 +0800)
commit2a22db391d1819f6068aa43e63632b350a0b4bec
treee5bb9a662099bfe01ea9db8300dfcd5038fdb58a
parent192790e994c9e15949e694e0a52010001b291611
RISC-V: Implment N modifier for printing the register number rather than the register name

The modifier `N`, to print the raw encoding of a register. This is used
when using `.insn <length>, <encoding>`, where the user wants to pass
a value to the instruction in a known register, but where the
instruction doesn't follow the existing instruction formats, so the
assembly parser is not expecting a register name, just a raw integer.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_print_operand): Add N.
* doc/extend.texi: Document for N,

gcc/testsuite/ChangeLog:

* gcc.target/riscv/modifier-N-fpr.c: New.
* gcc.target/riscv/modifier-N-vr.c: New.
* gcc.target/riscv/modifier-N.c: New.
gcc/config/riscv/riscv.cc
gcc/doc/extend.texi
gcc/testsuite/gcc.target/riscv/modifier-N-fpr.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/modifier-N-vr.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/modifier-N.c [new file with mode: 0644]