Date: Fri, 23 Nov 2001 23:28:46 -0800 From: Peter Wemm <peter@wemm.org> To: dfr@nlsystems.com Cc: ia64@freebsd.org Subject: gcc's mode(TI) attribute Message-ID: <20011124072846.DE754380D@overcee.netplex.com.au>
next in thread | raw e-mail | index | archive | help
I keep running into problems with this here: typedef int QItype __attribute__ ((mode (QI))); typedef unsigned int UQItype __attribute__ ((mode (QI))); typedef int HItype __attribute__ ((mode (HI))); typedef unsigned int UHItype __attribute__ ((mode (HI))); #if MIN_UNITS_PER_WORD > 1 /* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1 */ typedef int SItype __attribute__ ((mode (SI))); typedef unsigned int USItype __attribute__ ((mode (SI))); #if LONG_LONG_TYPE_SIZE > 32 /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */ typedef int DItype __attribute__ ((mode (DI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); /* We cannot represent a TItype constant on a machine with 32-bit HOST_WIDE_INTs, so it doesn't make sense to define these types. */ #if MIN_UNITS_PER_WORD > 4 && HOST_BITS_PER_WIDE_INT >= 64 /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4 */ typedef int TItype __attribute__ ((mode (TI))); typedef unsigned int UTItype __attribute__ ((mode (TI))); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #endif #endif #endif This is when building libgcc2 for things _muldi3() etc. "mode TI not supported on this architecture" etc. I had been cheating and changing it to this: typedef long long TItype; typedef unsigned long long UTItype; but I'm pretty sure that's wrong. I've also been noticing nasty things in other places that are doing similar integer overflows. eg: gcc/final.c shifts a 64 bit signed integer << 64, etc when trying to convert 'double' constants to 128 bit data. Also: ../../gcc/libgcc2.c: In function `__floattitf': ../../gcc/libgcc2.c:1037: warning: right shift count >= width of type ../../gcc/libgcc2.c:1040: warning: left shift count >= width of type and so on. I suspect this is why the compiler is segfaulting and aborting all over the place. Do I need to cross compile from a 64 bit platform to start with, eg: alpha? Has anybody else run into this and solved it? Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011124072846.DE754380D>