aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2023-07-17 17:42:42 +0100
committerCupertino Miranda <cupertino.miranda@oracle.com>2023-07-21 19:56:36 +0100
commit77d0f9ec3809b4d2e32c36069b6b9239d301c030 (patch)
tree59e4533c37a329c419887629bdfdeeba5a71ddce /gcc/doc
parent13ed106723c7c01cddd769b0bac14c81399e6b40 (diff)
downloadgcc-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/doc')
-rw-r--r--gcc/doc/invoke.texi21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5628c08..efd356e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -946,8 +946,8 @@ Objective-C and Objective-C++ Dialects}.
@emph{eBPF Options}
@gccoptlist{-mbig-endian -mlittle-endian -mkernel=@var{version}
--mframe-limit=@var{bytes} -mxbpf -mco-re -mno-co-re
--mjmpext -mjmp32 -malu32 -mcpu=@var{version}}
+-mframe-limit=@var{bytes} -mxbpf -mco-re -mno-co-re -mjmpext
+-mjmp32 -malu32 -mcpu=@var{version} -masm=@var{dialect}}
@emph{FR30 Options}
@gccoptlist{-msmall-model -mno-lsim}
@@ -24748,6 +24748,23 @@ the restrictions imposed by the BPF architecture:
@item Save and restore callee-saved registers at function entry and
exit, respectively.
@end itemize
+
+@opindex masm=@var{dialect}
+@item -masm=@var{dialect}
+Outputs assembly instructions using eBPF selected @var{dialect}. The default
+is @samp{normal}.
+
+Supported values for @var{dialect} are:
+
+@table @samp
+@item normal
+Outputs normal assembly dialect.
+
+@item pseudoc
+Outputs pseudo-c assembly dialect.
+
+@end table
+
@end table
@node FR30 Options