Universal Binary Programming Guidelines, Second Edition
PDF
Introduction
Building a Universal Binary
Build Assumptions
Building Your Code
Debugging
Troubleshooting Your Built Application
Determining Whether a Binary Is Universal
Build Options
Default Compiler Options
Architecture-Specific Options
Autoconf Macros
See Also
Architectural Differences
Alignment
Bit Fields
Byte Order
Calling Conventions
Code on the Stack: Disabling Execution
Data Type Conversions
Data Types
Divide-By-Zero Operations
Extensible Firmware Interface (EFI)
Floating-Point Equality Comparisons
Structures and Unions
See Also
Swapping Bytes
Why Byte Ordering Matters
Guidelines for Swapping Bytes
Byte-Swapping Routines
Byte-Swapping Strategies
Constants
Custom Apple Event Data
Custom Resource Data
Floating-Point Values
Integers
Network-Related Data
OSType-to-String Conversions
Unicode Text Files
Values in an Array
Writing a Callback to Swap Data Bytes
See Also
Guidelines for Specific Scenarios
Aliases
Archived Bit Fields
Automator Scripts
Bit Shifting
Bit Test, Set, and Clear Functions: Carbon and POSIX
CPU Subtype
Dashboard Widgets
Deprecated Functions
Disk Partitions
Double-Precision Values: Bit-by-Bit Sensitivity
Finder Information and Low-Level File System Operations
FireWire Device Access
Font-Related Resources
GWorlds
Java Applications
Java I/O API (NIO)
Machine Location Data Structure
Mach Processes: The Task for PID Function
Metrowerks PowerPlant
Multithreading
Objective-C: Messages to nil
Objective-C Runtime: Sending Messages
Open Firmware
OpenGL
OSAtomic Functions
Pixel Data
PostScript Printing
Quartz Bitmap Data
QuickDraw Routines
QuickTime Components
QuickTime Metadata Functions
Runtime Code Generation
Spotlight Importers
System-Specific Predefined Macros
USB Device Access
See Also
Preparing Vector-Based Code
Accelerate Framework
Rewriting AltiVec Instructions
See Also
Appendix A: Rosetta
What Can Be Translated?
How It Works
Special Considerations
Forcing an Application to Run Translated
Make a Setting in the Info Window
Use Terminal
Modify the Property List
Use the sysctlbyname Function
Preventing an Application from Opening Using Rosetta
Programmatically Detecting a Translated Application
Troubleshooting
Appendix B: Architecture-Independent Vector-Based Code
Architecture-Specific Code
Architecture-Independent Matrix Multiplication
Appendix C: 32-Bit Application Binary Interface
Appendix D: 64-Bit Application Binary Interface
Revision History