unsigned 64 bit integer not available

cancel
Showing results for 
Search instead for 
Did you mean: 

unsigned 64 bit integer not available

806 Views
deneb
Contributor II

Hello

 

I am trying to use unsigned 64bit integer on an HCS12, as e.g.,

 

unsigned long long var1

 

But it turns out that it is always allocated as 32 bit unsigned. Upon checking the "Type Sizes" in the compiler options, I see that "long long" is declared as 32-bits. I cannot change it to 64-bits because that column is disabled.

Any ideas on how to overcome this issue?

 

Thanks

deneb

Labels (1)
0 Kudos
1 Reply

63 Views
kef
Specialist I

You could do your own 64bit integer routines. These should be available on the net.

 

If execution time isn't issue and 52bits (0..+-2^52) are enough, then just use double instead of long long. Result of *-+/ should be the same, except that int/int may introduce fractional part and different behaviour on overflows.

 

Request imrpovement.

0 Kudos