diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-07-17 17:42:42 +0100 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-07-21 19:56:36 +0100 |
commit | 77d0f9ec3809b4d2e32c36069b6b9239d301c030 (patch) | |
tree | 59e4533c37a329c419887629bdfdeeba5a71ddce /gcc/config/bpf/bpf-opts.h | |
parent | 13ed106723c7c01cddd769b0bac14c81399e6b40 (diff) | |
download | gcc-77d0f9ec3809b4d2e32c36069b6b9239d301c030.zip gcc-77d0f9ec3809b4d2e32c36069b6b9239d301c030.tar.gz gcc-77d0f9ec3809b4d2e32c36069b6b9239d301c030.tar.bz2 |
bpf: pseudo-c assembly dialect support
New pseudo-c BPF assembly dialect already supported by clang and widely
used in the linux kernel.
gcc/ChangeLog:
PR target/110770
* config/bpf/bpf.opt: Added option -masm=<dialect>.
* config/bpf/bpf-opts.h (enum bpf_asm_dialect): New type.
* config/bpf/bpf.cc (bpf_print_register): New function.
(bpf_print_register): Support pseudo-c syntax for registers.
(bpf_print_operand_address): Likewise.
* config/bpf/bpf.h (ASM_SPEC): handle -msasm.
(ASSEMBLER_DIALECT): Define.
* config/bpf/bpf.md: Added pseudo-c templates.
* doc/invoke.texi (-masm=): New eBPF option item.
Diffstat (limited to 'gcc/config/bpf/bpf-opts.h')
-rw-r--r-- | gcc/config/bpf/bpf-opts.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/bpf/bpf-opts.h b/gcc/config/bpf/bpf-opts.h index 8282351..92db01e 100644 --- a/gcc/config/bpf/bpf-opts.h +++ b/gcc/config/bpf/bpf-opts.h @@ -60,4 +60,10 @@ enum bpf_isa_version ISA_V3, }; +enum bpf_asm_dialect +{ + ASM_NORMAL, + ASM_PSEUDOC +}; + #endif /* ! BPF_OPTS_H */ |