Loads two double-precision values into floating-point registers and updates the address base.
Note: The lfqux instruction is supported only in the POWER2 implementation of the POWER family architecture.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | FRT |
11-15 | RA |
16-20 | RB |
21-30 | 823 |
31 | Rc |
POWER2 | |
---|---|
lfqux | FRT, RA, RB |
The lfqux instruction loads the two doublewords from the location in memory specified by the effective address (EA) into two floating-point registers (FPR).
If general-purpose register (GPR) RA is not 0, the EA is the sum of the contents of GPR RA and GPR RB. If GPR RA is 0, the EA is the contents of GPR RB. The doubleword at the EA is loaded into FPR FRT. If FRT is 31, the doubleword at EA+8 is loaded into FPR 0; otherwise, it is loaded into FRT+1.
If GPR RA is not 0, the EA is placed into GPR RA.
The lfqux instruction has one syntax form and does not affect the Floating-Point Status and Control Register or Condition Register Field 0.
The following code calculates the sum of three double-precision, floating-point, two-dimensional coordinates:
# Assume the two-dimensional coordinates are contained # in a linked list with elements of the form: # list_element: # .double # Floating-point value of X. # .double # Floating-point value of Y. # .next_elem # Offset to next element; # # from X(n) to X(n+1). # # Assume GPR 3 contains the address of the first list element. # Assume GPR 4 contains the address where the resultant sums # will be stored. lfq 7,0(3) # Get first pair of X_Y values. lwz 5,16(3) # Get the offset to second element. lfqux 9,3,5 # Get second pair of X_Y values. lwz 5,16(3) # Get the offset to third element. fadd 7,7,9 # Add first two X values. fadd 8,8,10 # Add first two Y values. lfqux 9,3,5 # Get third pair of X_Y values. fadd 7,7,9 # Add third X value to sum. fadd 8,8,10 # Add third Y value to sum. stfq 7,0,4 # Store the two doubleword results.
Floating-Point Load and Store Instructions .