view gcc/testsuite/gcc.target/powerpc/float128-type-1.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

/* { dg-do compile { target { powerpc64*-*-linux* && lp64 } } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mdejagnu-cpu=power8 -O2 -mno-float128" } */

/* This test tests whether the underlying IEEE 128-bit floating point) is
   enabled by default on VSX Linux 64-bit systems, even if the keyword
   __float128 is not enabled .  Test that power8 generates a call to the
   __addkf3 emulation function.  */

#ifdef __LONG_DOUBLE_IEEE128
typedef double          __attribute__((__mode__(__TF__))) f128_t;
typedef _Complex double __attribute__((__mode__(__TC__))) f128c_t;

#else
typedef double          __attribute__((__mode__(__KF__))) f128_t;
typedef _Complex double __attribute__((__mode__(__KC__))) f128c_t;
#endif

f128_t
add_scalar (f128_t a, f128_t b)
{
  return a+b;
}


f128c_t
add_complex (f128c_t a, f128c_t b)
{
  return a+b;
}

/* { dg-final { scan-assembler "bl __addkf3" } } */