Originally posted by lacrymology:
Does anyone know if the long datatype will be 64-bit native in Panther?
-m
Nope, but the "long long" will be.
See here:
Subject : Apple on 64-bit-ness
To:
[email protected]
From: Ernest Prabhakar <
[email protected] >
Date: Wed, 10 Sep 2003 12:10:08 -0700
Hi all,
There seems to be a bit of confusion on this topic. The short answer is
* The PowerPC G5 processor is fully 64-bit
* Mac OS X supports many, but not all, services using 64-bit integers
* Currently, sizeof(void *) == 4
I realize that some people take a rigid position that 64-bit computing -> 64-bit OS -> sizeof(void *) == 8. Which may be understandable given their problem space, but reality - especially when dealing with mass-market personal computers, not speciality workstations - is a bit more complicated, and different people benefit from Mac OS X's level of 64-bit support in different ways.
A more official explanation is below. Please let me know if there's any confusion about this.
Sincerely,
Ernest Prabhakar
Product Manager, UNIX & Open Source
Apple
----------------------------------------
Mac OS X Jaguar (10.2.7 and later) features a redesigned kernel and updated system software math libraries specifically for the 64-bit PowerPC G5 processor. The updated kernel delivers the most substantial benefits of 64-bit computing by breaking through the 4GB physical memory barrier enabling the kernel to use all the RAM that can be added to the new Power Mac G5 (currently 8GB).
The key functions of the system math and vector libraries have been hand tuned to make maximum advantage of new and faster math functions that the 64-bit G5 is capable of. This is a great because unmodified applications that use the system math functions will get an automatic speed up when run on the G5. For example, the square root function is implemented as a software algorithm when run on a G3 or G4 but on a G5 when a square root calculation is requested the math library uses the super-fast hardware instruction that the G5 has.
This approach brings the maximum benefit of 64-bit processing to the desktop personal computer market and does so with full native-speed compatibility with existing 32-bit applications. Because the PowerPC instruction set was designed initially with 64-bit instructions in mind, this transition is a smooth and simple one for our developers and customers.
Apple has also supplied a new compiler, GCC version 3.3 which generates optimal code for the new G5 machine model. Importantly, this compiler produces code that executes efficiently on G5, G4 and G3 systems so a single Mac OS X application runs on each of our support processor architectures. This allows developers to build and qualify a single version of their applications for the 32-bit and 64-bit Mac systems.
Mac OS X Panther takes the same approach to the G5 as Jaguar but will be able to optimized additional math functions based on feedback from the developer community.
== References ===
Optimizing for the Power Mac G5
<
http://developer.apple.com/performan...imization.html > ):
Technical Note TN2086: Tuning for the G5: A Practical Guide
<
http://developer.apple.com/technotes/tn/tn2086.html >
Technical Note TN2087: PowerPC G5 Performance Primer
<
http://developer.apple.com/technotes/tn/tn2087.html >
Technical Note TN2090: Driver Tuning on Panther or G5 (Of interest only if you have written a device driver)
<
http://developer.apple.com/technotes/tn/tn2090.html >
Power Mac G5 Performance White Paper (PDF)
http://www.apple.com/powermac/pdf/Po..._WP_071503.pdf
== Default Sizes ===
sizeof (char) == 1
sizeof (short) == 2
sizeof (int) == 4
sizeof (long) == 4
sizeof (long long) == 8
sizeof (void *) == 4
sizeof (void (*)(void)) == 4
sizeof (float) == 4
sizeof (double) == 8
sizeof (long double) == 8* [may change in the future]
sizeof (size_t) == 4
sizeof (off_t) == 8
== G5-Related Flags for GCC ===
-mcpu=970
This allows the compiler to use instructions only available on the G5 (also known as 970) processor.
-mtune=970
This tells the compiler to tune code as optimally as it can for the G5. This flag can be safely used by itself on code that may run on processors other than the G5, because code compatibility is not changed.
-mpowerpc64
In combination with the above flags, this flag tells the compiler to enable the G5's native 64-bit long long support for greatly enhanced performance when working with long longs. At times, the -force_cpusubtype_ALL flag may also be needed.
_______________________________________________
scitech mailing list |
[email protected]
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.