The 'mod' and 'div' operators in eBPF are unsigned, with no signed
counterpart. xBPF adds two new ALU operations, sdiv and smod, for
signed division and modulus, respectively. Update bpf.md with
'define_insn' blocks for signed div and mod to use them when targetting
xBPF,
Hi Segher!
> On Thu, Sep 17, 2020 at 10:15:30AM -0700, David Faust via Gcc-patches wrote:
>> The 'mod' and 'div' operators in eBPF are unsigned, with no signed
>> counterpart. xBPF adds two new ALU operations, sdiv and smod, for
>> signed division and modulus, respectively. Update bpf.md with
>>
>> The 'mod' and 'div' operators in eBPF are unsigned, with no signed
>> counterpart. xBPF adds two new ALU operations, sdiv and smod, for
>> signed division and modulus, respectively. Update bpf.md with
>> 'define_insn' blocks for signed div and mod to use them when targetting
>> xBPF, and add n
The BPF ISA doesn't have a no-operation instruction, but in practice
the Linux kernel verifier performs some optimizations that rely on
these instructions to be encoded in a particular way. As it turns
out, we were using the "wrong" instruction in GCC.
This patch makes GCC to generate the expecte
Hi David.
> This patch updates the BPF back end to generate indirect calls via
> the 'call %reg' instruction when targetting xBPF.
>
> Additionally, the BPF ASM_SPEC is updated to pass along -mxbpf to
> gas, where it is now supported.
Thanks for the patch.
I just installed it on your behalf.
S
> On Wed, Sep 2, 2020 at 8:31 AM Jose E. Marchesi via Gcc-patches
> wrote:
>>
>>
>> Hi people!
>>
>> While adding a bpf-sim.exp to dejagnu, I noticed that the flags in
>> board/cflags were included in the final compilation line _after_ the
>> flag
Hi people!
While adding a bpf-sim.exp to dejagnu, I noticed that the flags in
board/cflags were included in the final compilation line _after_ the
flags in the test's dg-options.
Since the test options are more particular than the board options, I
would expect them to be placed after any board-
> BPF is an ELF-based target, so it definitely benefits from using
> elfos.h. This patch makes the target to use it, and removes
> superfluous definitions from bpf.h which are better defined in
> elfos.h.
>
> Note that BPF, despite being an ELF target, doesn't use DWARF. At
> some point it will
This patch makes the BPF backend to not provide its own implementation
of the asm_named_section hook; the default handler works perfectly
well.
2020-09-02 Jose E. Marchesi
gcc/
* config/bpf/bpf.c (bpf_asm_named_section): Delete.
(TARGET_ASM_NAMED_SECTION): Likewise.
---
BPF is an ELF-based target, so it definitely benefits from using
elfos.h. This patch makes the target to use it, and removes
superfluous definitions from bpf.h which are better defined in
elfos.h.
Note that BPF, despite being an ELF target, doesn't use DWARF. At
some point it will generate DWARF
> On 8/12/20 9:12 PM, Jose E. Marchesi wrote:
>> 1) CHERRY_PICK_PREFIX = '(cherry picked from commit ' and I used
>> a slightly differnt wording.
>
> Yes, you used a bit different wording :)
>
>> 2) If I am not mistaken while reading the script, the CHERRY_PICK
>> line
>> should be part o
> On 8/12/20 8:19 PM, Jose E. Marchesi wrote:
>> Hi Martin.
>>
I left the changelog entry dates of the original commits untouched,
and added `(cherry-pick from commit XXX)' lines to the commit
messages. Hope that is ok... please let me know otherwise!
>>>
>>> Hello.
>>>
>>> For c
Hi Martin.
>> I left the changelog entry dates of the original commits untouched,
>> and added `(cherry-pick from commit XXX)' lines to the commit
>> messages. Hope that is ok... please let me know otherwise!
>
> Hello.
>
> For creating a backport please use contrib/git-backport.py script.
> Th
This patch adds support for a new option -mxbpf. This tells GCC to
generate code for an expanded version of BPF that relaxes some of the
restrictions imposed by BPF.
(cherry pick of 51e10276d6792f67f1d88d90f299e7ac1b1f1f24)
2020-05-19 Jose E. Marchesi
gcc/
* config/bpf/bpf.opt (mxbpf
Hi people!
Just a few BPF related backports from master to the gcc-10 branch.
I left the changelog entry dates of the original commits untouched,
and added `(cherry-pick from commit XXX)' lines to the commit
messages. Hope that is ok... please let me know otherwise! :)
Salud!
Jose E. Marchesi
BPF considers that every call to a function allocates a fresh set of
registers that are available to the callee, of which the first five
may have bee initialized with the function arguments. This is
implemented by both interpreter and JIT in the Linux kernel.
This is enforced by the kernel BPF ve
This patch changes the existing support for BPF kernel helpers to be
more flexible, in two main ways.
First, there is no longer a hardcoded list of kernel helpers defined
in the compiler internals. This is replaced by a new target-specific
attribute `kernel_helper' that the user can use to define
This patch is a little cleanup that removes trailing whitespaces from
the bpf backend source files.
(cherry pick of commit e87c540fe43e29663140ed67b98ee437c25696bb)
2020-08-07 Jose E. Marchesi
gcc/
* config/bpf/bpf.md: Remove trailing whitespaces.
* config/bpf/constraints.md:
This patch is a little cleanup that removes trailing whitespaces from
the bpf backend source files.
2020-08-07 Jose E. Marchesi
gcc/
* config/bpf/bpf.md: Remove trailing whitespaces.
* config/bpf/constraints.md: Likewise.
* config/bpf/predicates.md: Likewise.
gcc/tests
This patch changes the existing support for BPF kernel helpers to be
more flexible, in two main ways.
First, there is no longer a hardcoded list of kernel helpers defined
in the compiler internals. This is replaced by a new target-specific
attribute `kernel_helper' that the user can use to define
Hi Nick.
libctf wants a bsearch that takes a void * arg pointer to avoid a
nonportable use of __thread.
bsearch_r is required, not optional, at this point because as far as I
can see this obvious-sounding function is not implemented by anyone's
libc. We can easily move
This patch adds support for a new option -mxbpf. This tells GCC to
generate code for an expanded version of BPF that relaxes some of the
restrictions imposed by BPF.
2020-05-19 Jose E. Marchesi
gcc/
* config/bpf/bpf.opt (mxbpf): New option.
* doc/invoke.texi (Option Summary):
BPF considers that every call to a function allocates a fresh set of
registers that are available to the callee, of which the first five
may have bee initialized with the function arguments. This is
implemented by both interpreter and JIT in the Linux kernel.
This is enforced by the kernel BPF ve
Hi people!
I just committed these two BPF-specific small patches. See each
commit for a description.
Hope I didn't screw up with the ChangeLog entries in the commit
message! :)
Salud!
Jose E. Marchesi (2):
bpf: add support for the -mxbpf option
bpf: do not save/restore callee-saved registe
201 - 224 of 224 matches
Mail list logo