Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-27 Thread Jeff Law
On 11/13/24 7:16 AM, Mariam Arutunian wrote: To address this, I added code in |target-supports.exp| and modified the relevant tests. I've attached the patch. Could you please check whether it is correct? Yea, it basically looks right. Doing a test now ;-) I think I've got the word_mode

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-24 Thread Jeff Law
On 11/24/24 9:27 AM, Mariam Arutunian wrote: Thank you very much! I'll have a look. Please let me know if there's anything specific you’d like me to address. Not yet. Things are looking really good. Enough so that I've been diving into the small word targets (avr, pru, rl78). Jeff

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-24 Thread Mariam Arutunian
On Sun, Nov 24, 2024, 08:59 Jeff Law wrote: > > > On 11/13/24 7:16 AM, Mariam Arutunian wrote: > > > > > > > To address this, I added code in |target-supports.exp| and modified the > > relevant tests. > > I've attached the patch. Could you please check whether it is correct? > Just a few more not

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-23 Thread Jeff Law
On 11/13/24 7:16 AM, Mariam Arutunian wrote: To address this, I added code in |target-supports.exp| and modified the relevant tests. I've attached the patch. Could you please check whether it is correct? Just a few more notes. I revamped the changes to emit_crc. I think the right way t

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-22 Thread Jeff Law
On 11/22/24 10:33 AM, Mariam Arutunian wrote: On Fri, Nov 22, 2024, 20:29 Jeff Law > wrote: On 11/13/24 7:16 AM, Mariam Arutunian wrote: > > > On Tue, Nov 12, 2024 at 2:15 AM Jeff Law mailto:jeffreya...@gmail.com> >

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-22 Thread Mariam Arutunian
On Fri, Nov 22, 2024, 20:29 Jeff Law wrote: > > > On 11/13/24 7:16 AM, Mariam Arutunian wrote: > > > > > > On Tue, Nov 12, 2024 at 2:15 AM Jeff Law > > wrote: > > > > > > > \ No newline at end of file > > > diff --git a/gcc/testsuite/gcc.target/riscv/crc-1

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-22 Thread Jeff Law
On 11/13/24 7:16 AM, Mariam Arutunian wrote: On Tue, Nov 12, 2024 at 2:15 AM Jeff Law > wrote: > + > + > +/* Generate assembly to calculate CRC using clmul instruction. > +   The following code will be generated when the CRC and data si

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-13 Thread Mariam Arutunian
On Tue, Nov 12, 2024 at 2:15 AM Jeff Law wrote: > > + > > + > > +/* Generate assembly to calculate CRC using clmul instruction. > > + The following code will be generated when the CRC and data sizes are > equal: > > + li a4,quotient > > + li a5,polynomial > > + xor a0,

Re: [RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-11 Thread Jeff Law
On 11/9/24 11:39 AM, Mariam Arutunian wrote: If the target is ZBC or ZBKC, it uses clmul instruction for the CRC calculation.  Otherwise, if the target is ZBKB, generates table-based CRC, but for reversing inputs and the output uses bswap and brev8 instructions.  Add new tests to check CRC gen

[RFC/RFA][PATCH v6 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-11-09 Thread Mariam Arutunian
If the target is ZBC or ZBKC, it uses clmul instruction for the CRC calculation. Otherwise, if the target is ZBKB, generates table-based CRC, but for reversing inputs and the output uses bswap and brev8 instructions. Add new tests to check CRC generation for ZBC, ZBKC and ZBKB targets. gcc/