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 12 - Assembly-Language Environmental Controls

This chapter describes how to use assembly-language instructions to control the floating-point environment (rounding direction and exception flags) described in Chapter 4, "Environmental Controls." The current state of the floating-point environment is stored in the Floating-Point Status and Control Register and summarized in the Condition Register. This chapter describes exactly how these two registers store the environment. Then it describes the PowerPC assembler instructions you can use to test or change the environment.

Read this chapter to learn how to access and manipulate the floating-point environment in assembly language or to learn how the PowerPC architecture stores the floating-point environment.


Chapter Contents
The Floating-Point Environment
The Floating-Point Status and Control Register
The Condition Register
Inquiries: Class and Sign
Floating-Point Result Flags and Condition Codes
Example: Determining Class
Setting the Rounding Direction
Floating-Point Exceptions
Exception Bits in the FPSCR
Signaling and Clearing Floating-Point Exceptions
Enabling and Disabling Floating-Point Exceptions
Testing for Floating-Point Exceptions
Saving and Restoring the Floating-Point Environment

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996