The FPUSHANDxx is a single operation having the effect
of an FPUSHxx operation followed by an SAND operation.
Explicitly, the logical operations are as follows:
Stack before FPUSHANDxx:
High Condition |
Low Condition |
|
 |
A |
B |
Top |
C |
D |
Next |
 |
Stack after FPUSHANDxx:
 |
Bank Selector |
Stack Item |
High Condition |
Low Condition |
 |
If Bs3 = 1 (low) |
Top |
(([Rs0].L*[Rs1].L) op [Rs2].L) & A |
(([Rs0].L*[Rs1].L) op [Rs2].L) & B |
|
Next |
C |
D |
 |
If Bs3 = 2 (high) |
Top |
(([Rs0].H*[Rs1].H) op [Rs2].H) & A |
(([Rs0].H*[Rs1].H) op [Rs2].H) & B |
|
Next |
C |
D |
 |
If Bs3 = 3 (vector) |
Top |
(([Rs0].H*[Rs1].H) op [Rs2].H) & A |
(([Rs0].L*[Rs1].L) op [Rs2].L) & B |
|
Next |
C |
D |
 |
Note: "[Rs].X" denotes the data on bank X of register Rs; A, B, C, D take the values
TRUE or FALSE; and "op" depends on the relation:
- For EQ, "op" is ==
- For NE, "op" is !=
- For GT, "op" is >
- For LT, "op" is <
- For GE, "op" is >=
- For LE, "op" is <=
Comparison is done through floating point normal operations. It is customary to have
in the relevant banks of Rs1 the value 1.0 (i.e., 0x3FF0000000000000).
Takes 9 cycles to execute.
Example: FPUSHANDxx 0xFF 3 0x40 0xA 0xB
STKC FLW IOC AGU ASEL BS5 P5 BS4 C4 P4 MPC BS3 C3 P3 P2 P1 P0
--------------------------------------------------------------------
- - - - - 0 00 0 0 00 FN01 0 0 00 00 0a 40
- - - - - 0 00 0 0 00 - 0 0 00 00 00 00
- - - - - 0 00 0 0 00 - 0 0 00 0b 00 00
- - - - - 0 00 0 0 00 - 0 0 00 00 00 00
- - - - - 0 00 0 0 00 - 0 0 00 00 00 00
- - - - - 0 00 0 0 00 - 0 0 00 00 00 00
- - - - - 0 00 0 0 00 - 0 0 00 00 00 00
- - - - - 0 00 0 0 00 - 3 0 ff 00 00 00
PAxx - - - - 0 00 0 0 00 - 0 0 00 00 00 00
--------------------------------------------------------------------
Where: xx is one of {EQ,NE,LE,LT,GE,GT}.
The exceptions are the same as the ones of the FNORM operations.
!! Initial conditions:
!! Content of register 0xA:
!! [0xA].H = 0xC004000000000000
!! [0xA].L = 0x400C000000000000
!!
!! Content of register 0xB:
!! [0xB].H = 0x3FF0000000000000
!! [0xA].L = 0x3FF0000000000000
!!
!! Content of register 0xC:
!! [0xC].H = 0xC004000000000000
!! [0xC].L = 0x401E000000000000
!!
!! Top of the stack is: H = A, L = B
FPUSHANDEQ 255 3 0xD 0xE 0xF !! Pushes: High = TRUE & a Low = FALSE & b
FPUSHANDEQ 255 2 0xD 0xE 0xF !! Pushes: High = TRUE & a Low = TRUE & b
FPUSHANDEQ 255 1 0xD 0xE 0xF !! Pushes: High = FALSE & a Low = FALSE & b