John Gilbert wrote:
Hello, Is there an underlying hardware reason why 'long double' is treated as 16 bytes on SPARC and 12 bytes on AMD64 and x86? It seems to be the case with both gcc and Sun Studio compilers. Thanks.
It's due to the ABI difference. x86 ABI defines long double as 96bit (probably due to x87's support of 80bit floating point and the minumum 32bit-aligned size to contain 80bit is 96bit). In retrospect, IMNSHO, this wasn't such a good decision but then again, 386/387 wasn't exactly intended to be a floating-point workhorse. SPARC v9 ISA has 128bit fp operations (although no processor actually implements them, so they are emulated by OS) so naturally SPARC ABI defines long double as 128bit Seongbae _______________________________________________ opensolaris-code mailing list [email protected] https://opensolaris.org:444/mailman/listinfo/opensolaris-code
