[COMMITTED] bpf: add pseudo-c asm dialect for "nop"

2023-07-24 Thread David Faust via Gcc-patches
The define_insn "nop" was missing a template for the pseudo-c dialect,
so the normal syntax was unconditionally emitted.

Tested on bpf-unknown-none, committed as obvious.

gcc/

* config/bpf/bpf.md (nop): Add pseudo-c asm dialect template.
---
 gcc/config/bpf/bpf.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/bpf/bpf.md b/gcc/config/bpf/bpf.md
index 3e2d760fbe4..64342ea1de2 100644
--- a/gcc/config/bpf/bpf.md
+++ b/gcc/config/bpf/bpf.md
@@ -103,7 +103,7 @@ (define_mode_attr msuffix [(SI "32") (DI "")])
 (define_insn "nop"
   [(const_int 0)]
   ""
-  "ja\t0"
+  "{ja\t0|goto 0}"
   [(set_attr "type" "alu")])
 
  Arithmetic/Logical
-- 
2.40.1



Re: [COMMITTED] bpf: add pseudo-c asm dialect for "nop"

2023-07-25 Thread Jose E. Marchesi via Gcc-patches


> The define_insn "nop" was missing a template for the pseudo-c dialect,
> so the normal syntax was unconditionally emitted.

Thank you.

> Tested on bpf-unknown-none, committed as obvious.
>
> gcc/
>
>   * config/bpf/bpf.md (nop): Add pseudo-c asm dialect template.
> ---
>  gcc/config/bpf/bpf.md | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/bpf/bpf.md b/gcc/config/bpf/bpf.md
> index 3e2d760fbe4..64342ea1de2 100644
> --- a/gcc/config/bpf/bpf.md
> +++ b/gcc/config/bpf/bpf.md
> @@ -103,7 +103,7 @@ (define_mode_attr msuffix [(SI "32") (DI "")])
>  (define_insn "nop"
>[(const_int 0)]
>""
> -  "ja\t0"
> +  "{ja\t0|goto 0}"
>[(set_attr "type" "alu")])
>  
>   Arithmetic/Logical