swar-inselm.c 1.12 KB
/* -----------------------------------------------------------------------------
 *  Copyright (C) 2018-2020 daiteq s.r.o.                http://www.daiteq.com
 *
 *  This program is distributed WITHOUT ANY WARRANTY; without even
 *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 *  PURPOSE.
 *
 * -----------------------------------------------------------------------------
 *  Filename    : swar-inselm.c
 *  Authors     : Roman Bartosinski
 *  Description : simple test of clang/LLVM compiler with SWAR extension
 *  Release     :
 *  Version     :
 *  Date        :
 * -----------------------------------------------------------------------------
 */

////A: --has-swar
//C: -daiteq-swar-enable

#define SWAR_USE_UNSIGNED_TYPES
#define SWAR_USE_SIGNED_TYPES
#include "swar-c99.h"

su32x1b ar1u[11];
//ss32x1b ar1s[13];

//su16x2b ar2u[17];
//ss16x2b ar2s[19];

//su10x3b ar3u[11];
//ss10x3b ar3s[13];

//su8x4b ar4u[17];
//ss8x4b ar4s[19];

//su4x8b ar8u[11];
//ss4x8b ar8s[13];

//su2x16b ar16u[17];
//ss2x16b ar16s[19];

int main(void)
{
  //ar1u[0].x = (su32x1b)0;
  SWAR_SET_ELM(&ar1u[1], 30, 1, 1);

  return 0;
}