Exemple #1
0
int32x4_t
bar (int64_t x)
{
  int32x2_t i = vcreate_s32 (x);
  int32x2_t zeroes = vcreate_s32 (0l);
  int32x4_t ret = vcombine_s32 (i, zeroes);
  return ret;
}
Exemple #2
0
void foo (int a)
{
  int32x2_t arg1;
  int32x2_t arg2;
  int32x2_t result;
  arg1 = vcreate_s32 (UINT64_C (0x0000ffffffffffff));
  arg2 = vcreate_s32 (UINT64_C (0x16497fffffffffff));
  /* The correct line number is in the preamble to the error message,
     not in the final line (which is all that dg-error inspects). Hence,
     we have to tell dg-error to ignore the line number.  */
  result = vrsra_n_s32 (arg1, arg2, a);
  /* { dg-error "must be a constant immediate" "" { target *-*-* } 0 } */
}
Exemple #3
0
void test_vcreates32 (void)
{
  int32x2_t out_int32x2_t;
  uint64_t arg0_uint64_t;

  out_int32x2_t = vcreate_s32 (arg0_uint64_t);
}
Exemple #4
0
inline int v_signmask(const v_uint32x4& a)
{
    int32x2_t m0 = vcreate_s32(CV_BIG_UINT(0x0000000100000000));
    uint32x4_t v0 = vshlq_u32(vshrq_n_u32(a.val, 31), vcombine_s32(m0, m0));
    uint64x2_t v1 = vpaddlq_u32(v0);
    return (int)vgetq_lane_u64(v1, 0) + ((int)vgetq_lane_u64(v1, 1) << 2);
}
Exemple #5
0
int32x4_t
foo (int32x2_t *x)
{
  int32x2_t i = *x;
  int32x2_t zeroes = vcreate_s32 (0l);
  int32x4_t ret = vcombine_s32 (i, zeroes);
  return ret;
}
Exemple #6
0
int
main (void)
{
  int64_t arg1;
  int32_t arg2;
  int32x4_t arg3;
  int64_t actual;
  int64_t expected;

  arg1 = -9223182289494545592LL;
  arg2 = 32768;
  arg3 = vcombine_s32 (vcreate_s32 (0xffff7fff8000ffffULL),
                       vcreate_s32 (0x80000000ffff0000ULL));

  actual = vqdmlals_laneq_s32 (arg1, arg2, arg3, 3);
  expected = -9223323026982900920LL;

  if (expected != actual)
    abort ();

  return 0;
}
int
main (void)
{
  int64_t arg1;
  int32_t arg2;
  int32x4_t arg3;
  int64_t actual;
  int64_t expected;

  arg1 = 140733193453567LL;
  arg2 = 25544;
  arg3 = vcombine_s32 (vcreate_s32 (0x417b8000ffff8397LL),
                       vcreate_s32 (0x7fffffff58488000LL));


  actual = vqdmlsls_laneq_s32 (arg1, arg2, arg3, 3);
  expected = 31022548895631LL;

  if (expected != actual)
    abort ();

  return 0;
}
Exemple #8
0
test_vdups_lane_s32 ()
{
  int32x2_t a;
  int32_t b;
  int32_t c[2] = { 0, 1 };

  a = vld1_s32 (c);
  b = wrap_vdups_lane_s32_0 (vcreate_s32 (0), a);
  if (c[0] != b)
    return 1;
  b = wrap_vdups_lane_s32_1 (a);
  if (c[1] != b)
    return 1;
  return 0;
}
Exemple #9
0
int
main (void)
{
  int32_t arg1;
  int32x2_t arg2;
  int32_t result;
  int32_t actual;
  int32_t expected;

  arg1 = 57336;
  arg2 = vcreate_s32 (0x55897fff7fff0000ULL);
  actual = vqdmulhs_lane_s32 (arg1, arg2, 0);
  expected = 57334;

  if (expected != actual)
    {
      fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
      abort ();
    }

  return 0;
}
int32x2_t test_vcreate_s32(uint64_t v1) {
  // CHECK: test_vcreate_s32
  return vcreate_s32(v1);
  // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
}