Skip Menu |

This queue is for tickets about the Math-Int128 CPAN distribution.

Report information
The Basics
Id: 87283
Status: rejected
Worked: 10 min
Priority: 0/
Queue: Math-Int128

People
Owner: Nobody in particular
Requestors: DANAJ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)



Subject: Fails on some targets (no tetra-integer type)
Found on Intel Atom with both gcc 4.5 and 4.7. The Atom doesn't have a 128-bit type, so gcc will fail both the __attribute__ ((__mode__(TI)) and uint128_t code. Unfortunately we're left without a really good solution. I found one set of code that did: #if (defined(__LP64__) || defined(__x86_64__) || defined(__powerpc64__) || defined(_M_X64) || defined(_M_IX86)) which at least tries to limit it to some set of targets that has the emulation implemented. I have tested at least some of this on Power7, x86_64, and Cygwin/Atom, but not extensively and not on lots of other platforms (e.g. SPARC, MIPS, HPPA, ia64).
Subject: Re: [rt.cpan.org #87283] Fails on some targets (no tetra-integer type)
Date: Thu, 25 Jul 2013 00:18:31 -0700 (PDT)
To: "bug-Math-Int128 [...] rt.cpan.org" <bug-Math-Int128 [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
>________________________________ > From: Dana Jacobsen via RT <bug-Math-Int128@rt.cpan.org> >To: >Sent: Thursday, July 25, 2013 7:42 AM >Subject: [rt.cpan.org #87283] Fails on some targets (no tetra-integer type) > > >Thu Jul 25 01:42:56 2013: Request 87283 was acted upon. >Transaction: Ticket created by DANAJ >       Queue: Math-Int128 >     Subject: Fails on some targets (no tetra-integer type) >   Broken in: 0.12 >    Severity: Normal >       Owner: Nobody >  Requestors: DANAJ@cpan.org >      Status: new >Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87283 > > > >Found on Intel Atom with both gcc 4.5 and 4.7.  The Atom doesn't have a 128-bit type, so gcc will fail both the __attribute__ ((__mode__(TI)) and uint128_t code.
128bit integers are supported by gcc on 64bit hosts only . This is a know limitation of the compiler.
Good point -- in this case Perl is compiled as 64-bit, hence I wanted 128 bit types to extend UV's. But yes, sizeof(long) with the compiler is 4. I was also thinking there was a detection method in the Makefile.PL tests that was getting skipped, but now I see there is not. The failure is just that Int128.xs stops with either "error: unable to emulate 'TI'" or "error: '__int128' is not supported for this target". So feel free to reject this or call it a trivial-priority feature request to detect this and give a pretty error message in the Makefile.PL stage.
This is a known problem that will not be fixed (unless some C compiler for 32bit systems gets 128bit integers).