Skip to content
Snippets Groups Projects
Commit 2a22db39 authored by Kito Cheng's avatar Kito Cheng
Browse files

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.
parent 192790e9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment