gas: support .half, .word and .dword directives in eBPF
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 17 Jul 2019 20:57:23 +0000 (22:57 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 17 Jul 2019 20:57:23 +0000 (22:57 +0200)
commite0b989a6d74efbcdadac4974d0b8520ac31cd9b6
tree5585c1fc5c6229a0c2415ea411cacb50349773c2
parentd8f68fcb9378b5ab1c945fa676e11da15be56dd6
gas: support .half, .word and .dword directives in eBPF

This little patch adds support to the eBPF port of GAS for a few data
directives.  The names for the directives have been chosen to be
coherent with the suffixes used in eBPF instructions: b, h, w and dw
for 8, 16, 32 and 64-bit values respectively.

Documentation and tests included.
Tested in a x86_64 host.

gas/ChangeLog:

2019-07-17  Jose E. Marchesi  <jose.marchesi@oracle.com>

* config/tc-bpf.c (md_pseudo_table): .half, .word and .dword.
* testsuite/gas/bpf/data.s: New file.
* testsuite/gas/bpf/data.d: Likewise.
* testsuite/gas/bpf/data-be.d: Likewise.
* testsuite/gas/bpf/bpf.exp: Run data and data-be.
* doc/c-bpf.texi (BPF Directives): New section.
gas/ChangeLog
gas/config/tc-bpf.c
gas/doc/c-bpf.texi
gas/testsuite/gas/bpf/bpf.exp
gas/testsuite/gas/bpf/data-be.d [new file with mode: 0644]
gas/testsuite/gas/bpf/data.d [new file with mode: 0644]
gas/testsuite/gas/bpf/data.s [new file with mode: 0644]