Add new constant data structure.
authorMichael Meissner <meissner@linux.ibm.com>
Wed, 15 Dec 2021 05:56:25 +0000 (00:56 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Wed, 15 Dec 2021 05:56:25 +0000 (00:56 -0500)
commitc6756b3bc1d2af1c8e86f0ad1711e9b9134520ba
treeb8ea0e611150caaa7b359d07bc2b8b0c1d5af9ac
parent71cc9b8c39148d19a8043b74ca8b6b4e8b8072ca
Add new constant data structure.

This patch provides the data structure and function to convert a
CONST_INT, CONST_DOUBLE, CONST_VECTOR, or VEC_DUPLICATE of a constant) to
an array of bytes, half-words, words, and  double words that can be loaded
into a 128-bit vector register.

The next patches will use this data structure to generate code that
generates load of the vector/floating point registers using the XXSPLTIDP,
XXSPLTIW, and LXVKQ instructions that were added in power10.

2021-12-15  Michael Meissner  <meissner@the-meissners.org>

gcc/

* config/rs6000/rs6000-protos.h (VECTOR_128BIT_BITS): New macro.
(VECTOR_128BIT_BYTES): Likewise.
(VECTOR_128BIT_HALF_WORDS): Likewise.
(VECTOR_128BIT_WORDS): Likewise.
(VECTOR_128BIT_DOUBLE_WORDS): Likewise.
(vec_const_128bit_type): New structure type.
(vec_const_128bit_to_bytes): New declaration.
* config/rs6000/rs6000.c (constant_int_to_128bit_vector): New
helper function.
(constant_fp_to_128bit_vector): New helper function.
(vec_const_128bit_to_bytes): New function.
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c