Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-28 Thread Jose E. Marchesi
> jemarch@termi:~/gnu/src/gcc-git/build-bpf/gcc$ PATH=.:$PATH ./xgcc -O2 -c /home/jemarch/gnu/src/gcc-git/gcc/testsuite/gcc.c-torture/compile/pr39928-2.c > during RTL pass: ira > /home/jemarch/gnu/src/gcc-git/gcc/testsuite/gcc.c-torture/compile/pr39928-2.c: In function ‘vq_nbest’:

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-28 Thread Richard Sandiford
jose.march...@oracle.com (Jose E. Marchesi) writes: > > +(define_expand "zero_extendsidi2" > > + [(set (match_operand:DI 0 "register_operand") > > + (zero_extend:DI (match_operand:SI 1 > "reg_or_indirect_memory_operand")))] > > + "" > > +{ > > +

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Jose E. Marchesi
> +(define_expand "zero_extendsidi2" > + [(set (match_operand:DI 0 "register_operand") > + (zero_extend:DI (match_operand:SI 1 "reg_or_indirect_memory_operand")))] > + "" > +{ > + if (register_operand (operands[1], SImode)) > +{

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Segher Boessenkool
Hi! On Tue, Aug 27, 2019 at 12:08:50PM +0100, Richard Sandiford wrote: > Mostly trivial formatting comments, but I think there's still a couple > of substantive points too. Sorry to piggy-back on your review once again. > jema...@gnu.org (Jose E. Marchesi) writes: > > +static rtx > > +bpf_functi

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Segher Boessenkool
On Tue, Aug 27, 2019 at 02:59:01PM +0200, Jose E. Marchesi wrote: > glglgl, scratch that, it is actually a 32-bit multiplication that then > gets extended to 64-bits: > > (define_insn "*mulsidi3_zeroextended" > [(set (match_operand:DI0 "register_operand" "=r,r") > (zero_extend:DI

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Jose E. Marchesi
> +(define_expand "zero_extendsidi2" > + [(set (match_operand:DI 0 "register_operand") > + (zero_extend:DI (match_operand:SI 1 "reg_or_indirect_memory_operand")))] > + "" > +{ > + if (register_operand (operands[1], SImode)) > +{ > + operands[1] = gen_lo

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Jose E. Marchesi
> +(define_insn "mulsidi3" > + [(set (match_operand:DI 0 "register_operand" "=r,r") > +(sign_extend:DI > + (mult:SI (match_operand:SI 1 "register_operand" "0,0") > + (match_operand:SI 2 "reg_or_imm_operand" "r,I"))

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Jose E. Marchesi
Hi Richard. > +(define_insn "mulsidi3" > + [(set (match_operand:DI 0 "register_operand" "=r,r") > +(sign_extend:DI > + (mult:SI (match_operand:SI 1 "register_operand" "0,0") > + (match_operand:SI 2 "reg_or_imm_operand" "r,I"]

Re: [PATCH V3 05/11] bpf: new GCC port

2019-08-27 Thread Richard Sandiford
Mostly trivial formatting comments, but I think there's still a couple of substantive points too. jema...@gnu.org (Jose E. Marchesi) writes: > +/* Return the builtin code corresponding to the kernel helper builtin > + __builtin_NAME, or 0 if the name doesn't correspond to a kernel > + helper b

[PATCH V3 05/11] bpf: new GCC port

2019-08-26 Thread Jose E. Marchesi
This patch adds a port for the Linux kernel eBPF architecture to GCC. ChangeLog: * configure.ac: Support for bpf-*-* targets. * configure: Regenerate. contrib/ChangeLog: * config-list.mk (LIST): Disable go in bpf-*-* targets. gcc/ChangeLog: * config.gcc: Support for bpf-*-* targets.