/* Copyright (C) 2016-2024 Free Software Foundation, Inc.

   This file is free software; you can redistribute it and/or modify it under
   the terms of the GNU General Public License as published by the Free
   Software Foundation; either version 3 of the License, or (at your option)
   any later version.

   This file is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

/* Half-precision floating point */
FLOAT_MODE (HF, 2, 0);
/* FIXME: No idea what format it is.  */
ADJUST_FLOAT_FORMAT (HF, &ieee_half_format);

/* Native vector modes.  */
VECTOR_MODE (INT, QI, 64);      /*		  V64QI */
VECTOR_MODE (INT, HI, 64);      /*		  V64HI */
VECTOR_MODE (INT, SI, 64);      /*		  V64SI */
VECTOR_MODE (INT, DI, 64);      /*		  V64DI */
VECTOR_MODE (INT, TI, 64);      /*		  V64TI */
VECTOR_MODE (FLOAT, HF, 64);    /*		  V64HF */
VECTOR_MODE (FLOAT, SF, 64);    /*		  V64SF */
VECTOR_MODE (FLOAT, DF, 64);    /*		  V64DF */

/* Artificial vector modes, for when vector masking doesn't work (yet).  */
VECTOR_MODE (INT, QI, 32);      /*		  V32QI */
VECTOR_MODE (INT, HI, 32);      /*		  V32HI */
VECTOR_MODE (INT, SI, 32);      /*		  V32SI */
VECTOR_MODE (INT, DI, 32);      /*		  V32DI */
VECTOR_MODE (INT, TI, 32);      /*		  V32TI */
VECTOR_MODE (FLOAT, HF, 32);    /*		  V32HF */
VECTOR_MODE (FLOAT, SF, 32);    /*		  V32SF */
VECTOR_MODE (FLOAT, DF, 32);    /*		  V32DF */
VECTOR_MODE (INT, QI, 16);      /*		  V16QI */
VECTOR_MODE (INT, HI, 16);      /*		  V16HI */
VECTOR_MODE (INT, SI, 16);      /*		  V16SI */
VECTOR_MODE (INT, DI, 16);      /*		  V16DI */
VECTOR_MODE (INT, TI, 16);      /*		  V16TI */
VECTOR_MODE (FLOAT, HF, 16);    /*		  V16HF */
VECTOR_MODE (FLOAT, SF, 16);    /*		  V16SF */
VECTOR_MODE (FLOAT, DF, 16);    /*		  V16DF */
VECTOR_MODE (INT, QI, 8);      /*		  V8QI */
VECTOR_MODE (INT, HI, 8);      /*		  V8HI */
VECTOR_MODE (INT, SI, 8);      /*		  V8SI */
VECTOR_MODE (INT, DI, 8);      /*		  V8DI */
VECTOR_MODE (INT, TI, 8);      /*		  V8TI */
VECTOR_MODE (FLOAT, HF, 8);    /*		  V8HF */
VECTOR_MODE (FLOAT, SF, 8);    /*		  V8SF */
VECTOR_MODE (FLOAT, DF, 8);    /*		  V8DF */
VECTOR_MODE (INT, QI, 4);      /*		  V4QI */
VECTOR_MODE (INT, HI, 4);      /*		  V4HI */
VECTOR_MODE (INT, SI, 4);      /*		  V4SI */
VECTOR_MODE (INT, DI, 4);      /*		  V4DI */
VECTOR_MODE (INT, TI, 4);      /*		  V4TI */
VECTOR_MODE (FLOAT, HF, 4);    /*		  V4HF */
VECTOR_MODE (FLOAT, SF, 4);    /*		  V4SF */
VECTOR_MODE (FLOAT, DF, 4);    /*		  V4DF */
VECTOR_MODE (INT, QI, 2);      /*		  V2QI */
VECTOR_MODE (INT, HI, 2);      /*		  V2HI */
VECTOR_MODE (INT, SI, 2);      /*		  V2SI */
VECTOR_MODE (INT, DI, 2);      /*		  V2DI */
VECTOR_MODE (INT, TI, 2);      /*		  V2TI */
VECTOR_MODE (FLOAT, HF, 2);    /*		  V2HF */
VECTOR_MODE (FLOAT, SF, 2);    /*		  V2SF */
VECTOR_MODE (FLOAT, DF, 2);    /*		  V2DF */

/* Vector units handle reads independently and thus no large alignment
   needed.  */
ADJUST_ALIGNMENT (V64QI, 1);
ADJUST_ALIGNMENT (V64HI, 2);
ADJUST_ALIGNMENT (V64SI, 4);
ADJUST_ALIGNMENT (V64DI, 8);
ADJUST_ALIGNMENT (V64TI, 16);
ADJUST_ALIGNMENT (V64HF, 2);
ADJUST_ALIGNMENT (V64SF, 4);
ADJUST_ALIGNMENT (V64DF, 8);
ADJUST_ALIGNMENT (V32QI, 1);
ADJUST_ALIGNMENT (V32HI, 2);
ADJUST_ALIGNMENT (V32SI, 4);
ADJUST_ALIGNMENT (V32DI, 8);
ADJUST_ALIGNMENT (V32TI, 16);
ADJUST_ALIGNMENT (V32HF, 2);
ADJUST_ALIGNMENT (V32SF, 4);
ADJUST_ALIGNMENT (V32DF, 8);
ADJUST_ALIGNMENT (V16QI, 1);
ADJUST_ALIGNMENT (V16HI, 2);
ADJUST_ALIGNMENT (V16SI, 4);
ADJUST_ALIGNMENT (V16DI, 8);
ADJUST_ALIGNMENT (V16TI, 16);
ADJUST_ALIGNMENT (V16HF, 2);
ADJUST_ALIGNMENT (V16SF, 4);
ADJUST_ALIGNMENT (V16DF, 8);
ADJUST_ALIGNMENT (V8QI, 1);
ADJUST_ALIGNMENT (V8HI, 2);
ADJUST_ALIGNMENT (V8SI, 4);
ADJUST_ALIGNMENT (V8DI, 8);
ADJUST_ALIGNMENT (V8TI, 16);
ADJUST_ALIGNMENT (V8HF, 2);
ADJUST_ALIGNMENT (V8SF, 4);
ADJUST_ALIGNMENT (V8DF, 8);
ADJUST_ALIGNMENT (V4QI, 1);
ADJUST_ALIGNMENT (V4HI, 2);
ADJUST_ALIGNMENT (V4SI, 4);
ADJUST_ALIGNMENT (V4DI, 8);
ADJUST_ALIGNMENT (V4TI, 16);
ADJUST_ALIGNMENT (V4HF, 2);
ADJUST_ALIGNMENT (V4SF, 4);
ADJUST_ALIGNMENT (V4DF, 8);
ADJUST_ALIGNMENT (V2QI, 1);
ADJUST_ALIGNMENT (V2HI, 2);
ADJUST_ALIGNMENT (V2SI, 4);
ADJUST_ALIGNMENT (V2DI, 8);
ADJUST_ALIGNMENT (V2TI, 16);
ADJUST_ALIGNMENT (V2HF, 2);
ADJUST_ALIGNMENT (V2SF, 4);
ADJUST_ALIGNMENT (V2DF, 8);
