bpf, docs: Add Clang note about BPF_ALU
authorDave Thaler <dthaler@microsoft.com>
Tue, 27 Sep 2022 18:59:47 +0000 (18:59 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 30 Sep 2022 20:41:25 +0000 (13:41 -0700)
Add Clang note about BPF_ALU.

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Link: https://lore.kernel.org/r/20220927185958.14995-4-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/clang-notes.rst

index b15179cb511771af5662287c50f3e3e8e1189a89..528feddf2db90a097e3960691a68b502d42ce71d 100644 (file)
@@ -14,6 +14,12 @@ Clang defined "CPU" versions, where a CPU version of 3 corresponds to the curren
 
 Clang can select the eBPF ISA version using ``-mcpu=v3`` for example to select version 3.
 
+Arithmetic instructions
+=======================
+
+For CPU versions prior to 3, Clang v7.0 and later can enable ``BPF_ALU`` support with
+``-Xclang -target-feature -Xclang +alu32``.  In CPU version 3, support is automatically included.
+
 Atomic operations
 =================