Numerics Example Using PowerPC Assembly Language
Listing 11-1 is a code example that shows when the PowerPC assembly-language numeric features might be useful. The instructions used in this example are described in the Motorola PowerPC 601 RISC Microprocessor User's Manual. This example evaluates the polynomial
It illustrates the evaluation of a polynomial
using Horner's recurrence
On entry, general-purpose register GPR0 contains the degree n (<256) of the polynomial, and floating-point register F1 points to a function argument x. The coefficient table consists of
double-format coefficients, starting with
. In this particular polynomial,