diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-10-30 15:57:58 +0100 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-10-30 15:57:58 +0100 |
commit | d3beaa140dd22316371f3ebb2570a215c800a46d (patch) | |
tree | a41ea8d18d933e2e455739cad1b32e639715e64e /gas | |
parent | a23cf0c2ece4812232cf9434bdc77fbb70ae3f6b (diff) | |
download | gdb-d3beaa140dd22316371f3ebb2570a215c800a46d.zip gdb-d3beaa140dd22316371f3ebb2570a215c800a46d.tar.gz gdb-d3beaa140dd22316371f3ebb2570a215c800a46d.tar.bz2 |
gas: bpf: new test for MOV with C-like numbers ll suffix
The BPF pseudo-c syntax supports both MOV and LDDW instructions:
mov: r1 = EXPR
lddw: r1 = EXPR ll
Note that the white space between EXPR and `ll' is necessary in order
to avoid ambiguity with the assembler's support for C-like numerical
suffixes. This patch adds a new test to the GAS BPF testsuite to make
sure that instructions like:
r1 = 666ll
are interpreted as `mov %r1,666', not as `lddw %r1,666'.
This matches clang's assembler behavior.
2023-10-30 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/bpf/alu-pseudoc.s: Add test to make sure C-like
suffix `ll' is not interpreted as lddw syntax.
* testsuite/gas/bpf/alu-pseudoc.d: Update expected results.
* testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/bpf/alu-be-pseudoc.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/bpf/alu-pseudoc.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/bpf/alu-pseudoc.s | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index fef3c24..230a4a7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2023-10-30 Jose E. Marchesi <jose.marchesi@oracle.com> + + * testsuite/gas/bpf/alu-pseudoc.s: Add test to make sure C-like + suffix `ll' is not interpreted as lddw syntax. + * testsuite/gas/bpf/alu-pseudoc.d: Update expected results. + * testsuite/gas/bpf/alu-be-pseudoc.d: Likewise. + 2023-10-02 Nick Clifton <nickc@redhat.com> PR 30861 diff --git a/gas/testsuite/gas/bpf/alu-be-pseudoc.d b/gas/testsuite/gas/bpf/alu-be-pseudoc.d index 4c0f6ba..80d167c 100644 --- a/gas/testsuite/gas/bpf/alu-be-pseudoc.d +++ b/gas/testsuite/gas/bpf/alu-be-pseudoc.d @@ -69,3 +69,4 @@ Disassembly of section .text: 1d0: d7 10 00 00 00 00 00 10 r1 = bswap16 r1 1d8: d7 20 00 00 00 00 00 20 r2 = bswap32 r2 1e0: d7 30 00 00 00 00 00 40 r3 = bswap64 r3 + 1e8: b7 20 00 00 00 00 02 9a r2=0x29a diff --git a/gas/testsuite/gas/bpf/alu-pseudoc.d b/gas/testsuite/gas/bpf/alu-pseudoc.d index b5ab569..ea08c9a 100644 --- a/gas/testsuite/gas/bpf/alu-pseudoc.d +++ b/gas/testsuite/gas/bpf/alu-pseudoc.d @@ -69,3 +69,4 @@ Disassembly of section .text: 1d0: d7 01 00 00 10 00 00 00 r1 = bswap16 r1 1d8: d7 02 00 00 20 00 00 00 r2 = bswap32 r2 1e0: d7 03 00 00 40 00 00 00 r3 = bswap64 r3 + 1e8: b7 02 00 00 9a 02 00 00 r2=0x29a
\ No newline at end of file diff --git a/gas/testsuite/gas/bpf/alu-pseudoc.s b/gas/testsuite/gas/bpf/alu-pseudoc.s index 323a652..3d60d4f 100644 --- a/gas/testsuite/gas/bpf/alu-pseudoc.s +++ b/gas/testsuite/gas/bpf/alu-pseudoc.s @@ -61,3 +61,5 @@ r1 = bswap16 r1 r2 = bswap32 r2 r3 = bswap64 r3 + ;; The following is to be interpreted as a mov, not lddw. + r2 = 666ll |