]> gcc.gnu.org Git - gcc.git/commit
Support load/store vector with right length.
authorMichael Meissner <meissner@linux.ibm.com>
Sat, 3 Dec 2022 01:40:49 +0000 (20:40 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Sat, 3 Dec 2022 01:40:49 +0000 (20:40 -0500)
commit359bb98ed976c82d50bc9078cadd1259886d971d
treeb6c5ef7d5d2cf91f3d42982200d266df4ec957be
parent0270b358f35c130effde066a158b7c6c5ae0f99f
Support load/store vector with right length.

This patch adds support for new instructions that may be added to the PowerPC
architecture in the future to enhance the load and store vector with length
instructions.

The current instructions (lxvl, lxvll, stxvl, and stxvll) are inconvient to use
since the count for the number of bytes must be in the top 8 bits of the GPR
register, instead of the bottom 8 bits.  This meant that code generating these
instructions typically had to do a shift left by 56 bits to get the count into
the right position.  In a future version of the PowerPC architecture, new
variants of these instructions might be added that expect the count to be in
the bottom 8 bits of the GPR register.  These patches add this support to GCC
if the user uses the -mcpu=future option.

I tested this patch on a little endian power10 system with long double using
the tradiational IBM double double format.  Assuming the other 6 patches for
-mcpu=future are checked in (or at least the first patch), can I check this
patch into the master branch for GCC 13.

2022-12-02   Michael Meissner  <meissner@linux.ibm.com>

gcc/

* config/rs6000/vsx.md (lxvl): If -mcpu=future, generate the lxvl with
the shift count automaticaly used in the insn.
(lxvrl): New insn for -mcpu=future.
(lxvrll): Likewise.
(stxvl): If -mcpu=future, generate the stxvl with the shift count
automaticaly used in the insn.
(stxvrl): New insn for -mcpu=future.
(stxvrll): Likewise.

gcc/testsuite/

* gcc.target/powerpc/lxvrl.c: New test.
gcc/config/rs6000/vsx.md
gcc/testsuite/gcc.target/powerpc/lxvrl.c [new file with mode: 0644]
This page took 0.06348 seconds and 6 git commands to generate.