]> gcc.gnu.org Git - gcc.git/commit
bpf: fix pseudo-c asm emitted for *mulsidi3_zeroextend
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 10 Nov 2023 00:12:49 +0000 (01:12 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 10 Nov 2023 00:16:07 +0000 (01:16 +0100)
commit8329ba359749830ef18a23a919fb87133446376a
tree963b748845861f6eb5e7324cc4cee92a00f965ed
parent9815ef77313cabcbf7886fd7f0832d9e8b7a4dfa
bpf: fix pseudo-c asm emitted for *mulsidi3_zeroextend

This patch fixes the pseudo-c BPF assembly syntax used for
*mulsidi3_zeroextend, which was being emitted as:

  rN *= wM

instead of the proper way to denote a mul32 in pseudo-C syntax:

  wN *= wM

Includes test.
Tested in bpf-unknown-none-gcc target in x86_64-linux-gnu host.

gcc/ChangeLog:

* config/bpf/bpf.cc (bpf_print_register): Accept modifier code 'W'
to force emitting register names using the wN form.
* config/bpf/bpf.md (*mulsidi3_zeroextend): Force operands to
always use wN written form in pseudo-C assembly syntax.

gcc/testsuite/ChangeLog:

* gcc.target/bpf/mulsidi3-zeroextend-pseudoc.c: New test.
gcc/config/bpf/bpf.cc
gcc/config/bpf/bpf.md
gcc/testsuite/gcc.target/bpf/mulsidi3-zeroextend-pseudoc.c [new file with mode: 0644]
This page took 0.062583 seconds and 5 git commands to generate.