This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __uint128_t missing in gcc4, scalar_mode_supported_p not set?


On Sun, Jan 09, 2005 at 10:43:21AM +0100, Olaf Hering wrote:
> glibc fails to build with gcc4 on powerpc-linux.

Due to the following code.

---
/* gcc 3.1 and newer support __uint128_t.  */
#if !__GNUC_PREREQ(3,1)
typedef struct {
  unsigned long u[4];
} __attribute((aligned(16))) __uint128_t;
#endif

/* Altivec registers */
typedef __uint128_t elf_vrreg_t;
---

No 32-bit gcc 4.0 target has 128 bit integer support, as far as I know.

Note that there's no real need to use __uint128_t here, the aligned
struct is just as good (*).  We don't need arithmetic, just laying out
the types.

*) Although it's better to use "unsigned int u[4]" so that the size
   doesn't change between -m32 and -m64 compiles.

> Where is scalar_mode_supported_p supposed to be initalized?

target-def.h

$ findfile | xargs grep -i SCALAR_MODE_SUPPORTED_P
./doc/tm.texi:@deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (enum machine_mode @var{mode})
./c-common.c:  if (targetm.scalar_mode_supported_p (TImode))
./c-common.c:  if (targetm.scalar_mode_supported_p (TImode))
./c-common.c:     valid_mode = targetm.scalar_mode_supported_p (mode);
./c-common.c:     valid_mode = targetm.scalar_mode_supported_p (GET_MODE_INNER (mode));
./config/ia64/ia64.c:static bool ia64_scalar_mode_supported_p (enum machine_mode mode);
./config/ia64/ia64.c:#undef TARGET_SCALAR_MODE_SUPPORTED_P
./config/ia64/ia64.c:#define TARGET_SCALAR_MODE_SUPPORTED_P ia64_scalar_mode_supported_p
./config/ia64/ia64.c:ia64_scalar_mode_supported_p (enum machine_mode mode)
./config/mips/mips.c:static bool mips_scalar_mode_supported_p (enum machine_mode);
./config/mips/mips.c:#undef TARGET_SCALAR_MODE_SUPPORTED_P
./config/mips/mips.c:#define TARGET_SCALAR_MODE_SUPPORTED_P mips_scalar_mode_supported_p
./config/mips/mips.c:mips_scalar_mode_supported_p (enum machine_mode mode)
./config/alpha/alpha.c:alpha_scalar_mode_supported_p (enum machine_mode mode)
./config/alpha/alpha.c:#undef TARGET_SCALAR_MODE_SUPPORTED_P
./config/alpha/alpha.c:#define TARGET_SCALAR_MODE_SUPPORTED_P alpha_scalar_mode_supported_p
./fortran/trans-types.c:      if (!targetm.scalar_mode_supported_p (mode))
./fortran/trans-types.c:      if (!targetm.scalar_mode_supported_p (mode))
./expr.c:  return targetm.scalar_mode_supported_p (innermode);
./targhooks.c:default_scalar_mode_supported_p (enum machine_mode mode)
./targhooks.h:extern bool default_scalar_mode_supported_p (enum machine_mode);
./target-def.h:#ifndef TARGET_SCALAR_MODE_SUPPORTED_P
./target-def.h:#define TARGET_SCALAR_MODE_SUPPORTED_P default_scalar_mode_supported_p
./target-def.h:  TARGET_SCALAR_MODE_SUPPORTED_P,                \
./target.h:  bool (* scalar_mode_supported_p) (enum machine_mode mode);


-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]