gas: BPF pseudo-c syntax tests
authorGuillermo E. Martinez <guillermo.e.martinez@oracle.com>
Thu, 20 Apr 2023 14:43:03 +0000 (16:43 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 26 Apr 2023 17:28:06 +0000 (19:28 +0200)
commitbba4624d035002ad90970ac06a9976c006872258
treef308e535073a4a975854a3909f8e154821a642cb
parentff5a51b377212532a0cf2acea37c6a5672893d8f
gas: BPF pseudo-c syntax tests

This patch expands the GAS BPF testsuite in order to also test the
alternative pseudo-C syntax used in BPF assembly.

This includes three main changes:

- Some general GAS tests involving assignment and equality operands in
  expressions (such as = and ==) are disabled in bpf-* targets,
  because the syntax collides with the pseudo-C BPF assembly syntax.

- New tests are added to the BPF GAS testsuite that test the pseudo-c
syntax.  Tests for all BPF instructions are included.

- New tests are added to the BPF GAS testsuite that test the support
  for both syntaxes in the same source.

gas/ChangeLog:

2023-04-20  Guillermo E. Martinez  <guillermo.e.martinez@oracle.com>

PR gas/29728
* testsuite/gas/all/assign-bad-recursive.d: Skip test in bpf-*
targets.
* testsuite/gas/all/eqv-dot.d: Likewise.
* testsuite/gas/all/gas.exp: Skip other assignment tests in bpf-*.
* testsuite/gas/bpf/alu-pseudoc.s: New file.
* testsuite/gas/bpf/pseudoc-normal.s: Likewise.
* testsuite/gas/bpf/pseudoc-normal.d: Likewise.
* testsuite/gas/bpf/pseudoc-normal-be.d: Likewise.
* testsuite/gas/bpf/mem-pseudoc.s: Likewise.
* testsuite/gas/bpf/lddw-pseudoc.s: Likewise.
* testsuite/gas/bpf/jump32-pseudoc.s: Likewise.
* testsuite/gas/bpf/jump-pseudoc.s: Likewise.
* testsuite/gas/bpf/indcall-1-pseudoc.s: Likewise.
* testsuite/gas/bpf/atomic-pseudoc.s: Likewise.
* testsuite/gas/bpf/alu32-pseudoc.s: Likewise.
* testsuite/gas/bpf/*.d: Add -pseudoc variants of the tests.
31 files changed:
gas/ChangeLog
gas/testsuite/gas/all/assign-bad-recursive.d
gas/testsuite/gas/all/eqv-dot.d
gas/testsuite/gas/all/gas.exp
gas/testsuite/gas/bpf/alu-be.d
gas/testsuite/gas/bpf/alu-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/alu32-be.d
gas/testsuite/gas/bpf/alu32-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/alu32.d
gas/testsuite/gas/bpf/atomic-be.d
gas/testsuite/gas/bpf/atomic-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/atomic.d
gas/testsuite/gas/bpf/bpf.exp
gas/testsuite/gas/bpf/indcall-1-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/indcall-1.d
gas/testsuite/gas/bpf/indcall-bad-1.l
gas/testsuite/gas/bpf/jump-be.d
gas/testsuite/gas/bpf/jump-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/jump.d
gas/testsuite/gas/bpf/jump32-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/jump32.d
gas/testsuite/gas/bpf/lddw-be.d
gas/testsuite/gas/bpf/lddw-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/lddw.d
gas/testsuite/gas/bpf/mem-be.d
gas/testsuite/gas/bpf/mem-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/mem.d
gas/testsuite/gas/bpf/pseudoc-normal-be.d [new file with mode: 0644]
gas/testsuite/gas/bpf/pseudoc-normal.d [new file with mode: 0644]
gas/testsuite/gas/bpf/pseudoc-normal.s [new file with mode: 0644]
gas/testsuite/gas/macros/macros.exp