#include <arm_neon.h>
#include "arm-neon-ref.h"
#include "compute-ref-data.h"

/* Expected results splitted in several chunks.  */
/* Chunk 0.  */
VECT_VAR_DECL(expected0,int,8,8) [] = { 0xf0, 0xf4, 0x11, 0x11,
					0xf1, 0xf5, 0x11, 0x11 };
VECT_VAR_DECL(expected0,int,16,4) [] = { 0xfff0, 0xfff2,
					 0x22, 0x22 };
VECT_VAR_DECL(expected0,int,32,2) [] = { 0xfffffff0, 0xfffffff1 };
VECT_VAR_DECL(expected0,uint,8,8) [] = { 0xf0, 0xf4, 0x55, 0x55,
					 0xf1, 0xf5, 0x55, 0x55 };
VECT_VAR_DECL(expected0,uint,16,4) [] = { 0xfff0, 0xfff2,
					  0x66, 0x66 };
VECT_VAR_DECL(expected0,uint,32,2) [] = { 0xfffffff0, 0xfffffff1 };
VECT_VAR_DECL(expected0,poly,8,8) [] = { 0xf0, 0xf4, 0x55, 0x55,
					 0xf1, 0xf5, 0x55, 0x55 };
VECT_VAR_DECL(expected0,poly,16,4) [] = { 0xfff0, 0xfff2,
					  0x66, 0x66 };
#if defined (FP16_SUPPORTED)
VECT_VAR_DECL (expected0, hfloat, 16, 4) [] = { 0xcc00, 0xcb00,
						0x4b4d, 0x4b4d };
#endif
VECT_VAR_DECL(expected0,hfloat,32,2) [] = { 0xc1800000, 0xc1700000 };
VECT_VAR_DECL(expected0,int,8,16) [] = { 0xf0, 0xf8, 0x11, 0x11,
					 0xf1, 0xf9, 0x11, 0x11,
					 0xf2, 0xfa, 0x11, 0x11,
					 0xf3, 0xfb, 0x11, 0x11 };
VECT_VAR_DECL(expected0,int,16,8) [] = { 0xfff0, 0xfff4, 0x22, 0x22,
					 0xfff1, 0xfff5, 0x22, 0x22 };
VECT_VAR_DECL(expected0,int,32,4) [] = { 0xfffffff0, 0xfffffff2,
					 0x33, 0x33 };
VECT_VAR_DECL(expected0,uint,8,16) [] = { 0xf0, 0xf8, 0x55, 0x55,
					  0xf1, 0xf9, 0x55, 0x55,
					  0xf2, 0xfa, 0x55, 0x55,
					  0xf3, 0xfb, 0x55, 0x55 };
VECT_VAR_DECL(expected0,uint,16,8) [] = { 0xfff0, 0xfff4, 0x66, 0x66,
					  0xfff1, 0xfff5, 0x66, 0x66 };
VECT_VAR_DECL(expected0,uint,32,4) [] = { 0xfffffff0, 0xfffffff2,
					  0x77, 0x77 };
VECT_VAR_DECL(expected0,poly,8,16) [] = { 0xf0, 0xf8, 0x55, 0x55,
					  0xf1, 0xf9, 0x55, 0x55,
					  0xf2, 0xfa, 0x55, 0x55,
					  0xf3, 0xfb, 0x55, 0x55 };
VECT_VAR_DECL(expected0,poly,16,8) [] = { 0xfff0, 0xfff4, 0x66, 0x66,
					  0xfff1, 0xfff5, 0x66, 0x66 };
#if defined (FP16_SUPPORTED)
VECT_VAR_DECL (expected0, hfloat, 16, 8) [] = { 0xcc00, 0xca00,
						0x4b4d, 0x4b4d,
						0xcb80, 0xc980,
						0x4b4d, 0x4b4d };
#endif
VECT_VAR_DECL(expected0,hfloat,32,4) [] = { 0xc1800000, 0xc1600000,
					    0x42073333, 0x42073333 };

/* Chunk 1.  */
VECT_VAR_DECL(expected1,int,8,8) [] = { 0xf2, 0xf6, 0x11, 0x11,
					0xf3, 0xf7, 0x11, 0x11 };
VECT_VAR_DECL(expected1,int,16,4) [] = { 0xfff1, 0xfff3,
					 0x22, 0x22 };
VECT_VAR_DECL(expected1,int,32,2) [] = { 0x33, 0x33 };
VECT_VAR_DECL(expected1,uint,8,8) [] = { 0xf2, 0xf6, 0x55, 0x55,
					 0xf3, 0xf7, 0x55, 0x55 };
VECT_VAR_DECL(expected1,uint,16,4) [] = { 0xfff1, 0xfff3,
					  0x66, 0x66 };
VECT_VAR_DECL(expected1,uint,32,2) [] = { 0x77, 0x77 };
VECT_VAR_DECL(expected1,poly,8,8) [] = { 0xf2, 0xf6, 0x55, 0x55,
					 0xf3, 0xf7, 0x55, 0x55 };
VECT_VAR_DECL(expected1,poly,16,4) [] = { 0xfff1, 0xfff3,
					  0x66, 0x66 };
#if defined (FP16_SUPPORTED)
VECT_VAR_DECL (expected1, hfloat, 16, 4) [] = { 0xcb80, 0xca80,
						0x4b4d, 0x4b4d };
#endif
VECT_VAR_DECL(expected1,hfloat,32,2) [] = { 0x42066666, 0x42066666 };
VECT_VAR_DECL(expected1,int,8,16) [] = { 0xf4, 0xfc, 0x11, 0x11,
					 0xf5, 0xfd, 0x11, 0x11,
					 0xf6, 0xfe, 0x11, 0x11,
					 0xf7, 0xff, 0x11, 0x11 };
VECT_VAR_DECL(expected1,int,16,8) [] = { 0xfff2, 0xfff6, 0x22, 0x22,
					 0xfff3, 0xfff7, 0x22, 0x22 };
VECT_VAR_DECL(expected1,int,32,4) [] = { 0xfffffff1, 0xfffffff3,
					 0x33, 0x33 };
VECT_VAR_DECL(expected1,uint,8,16) [] = { 0xf4, 0xfc, 0x55, 0x55,
					  0xf5, 0xfd, 0x55, 0x55,
					  0xf6, 0xfe, 0x55, 0x55,
					  0xf7, 0xff, 0x55, 0x55 };
VECT_VAR_DECL(expected1,uint,16,8) [] = { 0xfff2, 0xfff6, 0x66, 0x66,
					  0xfff3, 0xfff7, 0x66, 0x66 };
VECT_VAR_DECL(expected1,uint,32,4) [] = { 0xfffffff1, 0xfffffff3,
					  0x77, 0x77 };
VECT_VAR_DECL(expected1,poly,8,16) [] = { 0xf4, 0xfc, 0x55, 0x55,
					  0xf5, 0xfd, 0x55, 0x55,
					  0xf6, 0xfe, 0x55, 0x55,
					  0xf7, 0xff, 0x55, 0x55 };
VECT_VAR_DECL(expected1,poly,16,8) [] = { 0xfff2, 0xfff6, 0x66, 0x66,
					  0xfff3, 0xfff7, 0x66, 0x66 };
#if defined (FP16_SUPPORTED)
VECT_VAR_DECL (expected1, hfloat, 16, 8) [] = { 0xcb00, 0xc900,
						0x4b4d, 0x4b4d,
						0xca80, 0xc880,
						0x4b4d, 0x4b4d };
#endif
VECT_VAR_DECL(expected1,hfloat,32,4) [] = { 0xc1700000, 0xc1500000,
					    0x42073333, 0x42073333 };

#define INSN_NAME vzip
#define TEST_MSG "VZIP/VZIPQ"

#include "vshuffle.inc"
