Re: Size of C/C++ data type from GNU GCC/g++ compiled ELF 64-bit LSB executable, AMD x86-64 vs. ELF 32-bit LSB executable, Intel 80386

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If you're on a compatible host, why not just build in 32-bit mode?  If
> the app is really not portable and meant to be on 32-bit platforms, then
> your options seem obvious.  Either build in 32-bit mode "e.g. -m32", or
> fix the application to not depend on the size of given data types (that
> is the max size).

We build the model with -m32 option on Opteron. They work fine; almost the
same as in P4/P5 CPU. 

At another level of simulation, which used up 4GB 32-bit address space, we
have to use pure 64-bit build. We see segfault when running some test. 

  
> In reality, in proper portable code it shouldn't matter.  So long as the
> data types are big enough you can always mask off upper bits.

In hardware implementation we simulate is strictly a 32-bit platform, the
rounding of final results and intermediate computation are cut-off, not like
the way of round-half-up. This might contribute to different results in
64-bit and 32-bit binary. 




-- 
View this message in context: http://www.nabble.com/Size-of-C-C%2B%2B-data-type-from-GNU-GCC-g%2B%2B-compiled-ELF-64-bit-LSB-executable%2C-AMD-x86-64-vs.-ELF-32-bit-LSB-executable%2C-Intel-80386-tf3942845.html#a11194094
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux