Dear friends,
if I run GPC on a 64 bit machine (an AMD Athlon 64 X2 ), it is supposed to produce 64-bit code, is it right? But what are then the sizes of the various integer types available in GPC? If I let this code
program sizes; begin writeln ('# size of integer is = ', sizeof (integer) ); writeln ('# size of medint is = ', sizeof (medint) ); writeln ('# size of longint is = ', sizeof (longint) ); end.
print them out, I get these results:
# size of integer is = 8 # size of medint is = 8 # size of longint is = 8
is that right? Shouldn't it be like 4,8,16?
Thanks, regards
Silvio a Beccara
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Chatta con chi preferisci
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5489&d=25-7
Silvio a Beccara wrote:
Dear friends,
if I run GPC on a 64 bit machine (an AMD Athlon 64 X2 ), it is supposed to produce 64-bit code, is it right? But what are then the sizes of the various integer types available in GPC? If I let this code
program sizes; begin writeln ('# size of integer is = ', sizeof (integer) ); writeln ('# size of medint is = ', sizeof (medint) ); writeln ('# size of longint is = ', sizeof (longint) ); end.
print them out, I get these results:
# size of integer is = 8 # size of medint is = 8 # size of longint is = 8
is that right? Shouldn't it be like 4,8,16?
Concerning `integer' size see (long) disscusion starting at:
http://www.gnu-pascal.de/crystal/gpc/en/mail10498.html
In the manual we promise that `longint' has the same size as C `long long', and on AMD64 (like on other 64-bit machines) `long long' has size 8.
We lack 16-byte integer due to bugs: theoretically the backend handled 16-byte types, but had serious bugs. The bugs would affect all programs (even ones which do not want to use 16-byte integers) because RTS in few places has to use the largest available integer type.
I am going to re-check support for 16-byte integers: most related bugs is fixed now, but I am not sure if all.