[2/7] riscv: bitmanip/zbb: Add prefix/postfix and enable visiblity
Commit Message
From: Christoph Müllner <christoph.muellner@vrull.eu>
INSNs are usually postfixed by a number representing the argument count.
Given the instructions will be used in a later commit, let's make them
visible, but add a "riscv_" prefix to avoid conflicts with standard
INSNs.
gcc/ChangeLog:
* config/riscv/bitmanip.md (*<optab>_not<mode>): Rename INSN.
(riscv_<optab>_not<mode>3): Rename INSN.
(*xor_not<mode>): Rename INSN.
(xor_not<mode>3): Rename INSN.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
---
gcc/config/riscv/bitmanip.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 11/13/22 16:05, Christoph Muellner wrote:
> From: Christoph Müllner <christoph.muellner@vrull.eu>
>
> INSNs are usually postfixed by a number representing the argument count.
> Given the instructions will be used in a later commit, let's make them
> visible, but add a "riscv_" prefix to avoid conflicts with standard
> INSNs.
>
> gcc/ChangeLog:
>
> * config/riscv/bitmanip.md (*<optab>_not<mode>): Rename INSN.
> (riscv_<optab>_not<mode>3): Rename INSN.
> (*xor_not<mode>): Rename INSN.
> (xor_not<mode>3): Rename INSN.
Not strictly necessary, but given how often I've seen ports expose an
insn with a standard name, but ever so slightly different semantics and
the ensuing code correctness issues, I like the idea of prefixing.
OK
jeff
@@ -119,7 +119,7 @@ (define_insn "*slliuw"
;; ZBB extension.
-(define_insn "*<optab>_not<mode>"
+(define_insn "riscv_<optab>_not<mode>3"
[(set (match_operand:X 0 "register_operand" "=r")
(bitmanip_bitwise:X (not:X (match_operand:X 1 "register_operand" "r"))
(match_operand:X 2 "register_operand" "r")))]
@@ -128,7 +128,7 @@ (define_insn "*<optab>_not<mode>"
[(set_attr "type" "bitmanip")
(set_attr "mode" "<X:MODE>")])
-(define_insn "*xor_not<mode>"
+(define_insn "riscv_xor_not<mode>3"
[(set (match_operand:X 0 "register_operand" "=r")
(not:X (xor:X (match_operand:X 1 "register_operand" "r")
(match_operand:X 2 "register_operand" "r"))))]