Re: [AD] Allegro on 64-bit platforms

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I thought int was 64 bits on 64 bit platforms? The traditional
> definition is `int is the fastest integer type that has at least 16 bits'.

No, MSVC is P64 and GCC is LP64 so 'int' are 32-bit in both cases.

> As far as I can see, all routines in fmaths.inl would work unmodified on
> 64 bit integers. Obviously the assembler is hard-coded for 32 bit, but I
> thought that has to be rewritten anyway?

Not for AMD64 I think.

> Actually, I didn't think about those, I was rather referring to fields
> from your grep output that store the length of strings and samples, etc.
> But array indices are obviously the same thing. Hmm, for convenience I
> personally prefer using int. So on second thought, I don't know how much
> it is worth to allow arrays with more than two billion elements.

Yes, array indexes had better be 'int'.

> That was not what I meant. I meant to define a new type, say `longest'.
> On platforms where there is a primitive type that holds 64 bits,
> `longest' would do that. On other platforms, `longest' would be 32 bits.

Ok, that's what I meant too.

> I agree the names can be a bit confusing. For clarity we could rename
> them to pack_get8/16/32 etc. but I'm not sure it's worth the effort.

I think this is a good idea though.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/