Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 3 - Numerics in PowerPC Assembly Language
Chapter 11 - Introduction to Assembly-Language Numerics


Floating-Point Instructions

Most floating-point operations are performed by the PowerPC floating-point processor. Floating-point arithmetic, conversion, comparison, and other operations are supported through assembler instructions. The only basic arithmetic operations supported are add, subtract, multiply, divide, and round-to-integer. In addition to instructions that perform the basic numeric operations, PowerPC assembly language provides instructions that can perform both a multiply and an add or subtract with at most a single roundoff error (called multiply-add instructions) and instructions that manipulate the sign bit of a number. All PowerPC floating-point assembler instructions conform to the IEEE standard.

All floating-point instructions (other than load instructions) operate on data located in the floating-point registers. The data must be loaded into a floating-point register before any operation can be performed.

Even though the floating-point registers are double format, the data can be in either single or double format. The instruction mnemonic specifies whether the data in the floating-point register is interpreted as single or double format. For example, fadd means add two double-format numbers, and fadds means add two single-format numbers.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996