[M3devel] __int128 coming to gcc

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Wed Jan 20 17:30:39 CET 2010


On Wed, Jan 20, 2010 at 11:20:03AM +0000, Jay K wrote:
> 
> Ok with changing LONGINT to be __int128, *but*
> 
> you really should not change it with a compiler flag.
> 
> For any given platform, "basics" like this should not change meaning.
> 
> It makes it such that you can't link code safely.
> 
>  
> 
>  
> 
> Basically, "platform" or "target" should map to one "ABI".
> 
>  
> 
>  
> 
> I really kind of like what I proposed earlier.
> 
>   Let the user define things.
>
>   TYPE INT64 = BITS 64 FOR INTEGER;
> 
>   TYPE INT128 = BITS 128 FOR INTEGER;
>  
> 
> TYPE INT256 = BITS 256 FOR INTEGER;
> 
> 
>   (* either an error, or the compiler generates calls to multi-precision library *)

Well, with INTEGER being defined as the type for efficient integer 
arithmetic, you's have to say

  TYPE INT64 = BITS 64 FOR LONGINT;

  TYPE INT128 = BITS 128 FOR LONGINT;

 

TYPE INT256 = BITS 256 FOR LONGINT;

and on many current machines, file offset should then be defined as 
BITS64 instead of LONGINT.

-- hendrik

> This is btw why the user thread stuff should be either 1) a runtime alterable decision



More information about the M3devel mailing list