[PATCH] rs6000: Add support for the vec_sbox_be, vec_cipher_be etc. builtins.

Segher Boessenkool segher@kernel.crashing.org
Tue Feb 19 19:14:00 GMT 2019


On Tue, Feb 12, 2019 at 02:00:38PM +0800, Xiong Hu Luo wrote:
> On 2019/1/26 AM1:43, Segher Boessenkool wrote:
> >On Wed, Jan 23, 2019 at 03:57:28AM -0600, luoxhu@linux.vnet.ibm.com wrote:
> >>The 5 new builtins vec_sbox_be, vec_cipher_be, vec_cipherlast_be, 
> >>vec_ncipher_be
> >>and vec_ncipherlast_be only support vector unsigned char type parameters.
> >>Add new instruction crypto_vsbox_<mode> and crypto_<CR_insn>_<mode> to 
> >>handle
> >>them accordingly, where the new mode CR_vqdi can be expanded to vector 
> >>unsigned
> >>long long for none _be postfix builtins or vector unsigned char for _be 
> >>postfix
> >>builtins.
> >
> >Hrm, can't you use the existing CR_mode iterator here?
> >
> >>2019-01-23  Xiong Hu Luo  <luoxhu@linux.vnet.ibm.com>
> >>
> >>	* gcc/testsuite/gcc.target/powerpc/crypto-builtin-1.c
> >>	(crpyto1_be, crpyto2_be, crpyto3_be, crpyto4_be, crpyto5_be):
> >>         New testcases.
> >
> >Typoes ("crypto").  And that last line is indented incorrectly.
> >
> >With those things fixed, okay for trunk, with the new iterator if CR_mode
> >isn't usable here.  Thanks!
> 
> Thanks, I will fix the typos and indent.
> CR_mode support all the 4 types(v16qi, v8hi, v4si and v2di), so we 
> define the new mode CR_vqdi to represent only 2 types(v16qi and v2di) we 
> need, means that these two modes cannot be reused.
> BTW, does this patch need back port to gcc-7 and gcc-8?

[ Sorry, I think I forgot to reply to this. ]

They probably should be backported, yes.  Okay to backport after 8.3 has
been released.  Thanks!


Segher



More information about the Gcc-patches mailing list