Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-22 Thread Jose E. Marchesi via Gcc-patches
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,

Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-22 Thread Jose E. Marchesi via Gcc-patches
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 >>

Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-18 Thread Segher Boessenkool
Hi! 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 > 'define_insn'

Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-18 Thread David Faust via Gcc-patches
> >>> 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

Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-18 Thread Jose E. Marchesi via Gcc-patches
>> 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

Re: [PATCH] bpf: use xBPF signed div, mod insns when available

2020-09-17 Thread Jeff Law via Gcc-patches
On 9/17/20 11:15 AM, 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 > 'define_insn' blocks for signed div and