Back
MASM : STACK : FPUSHANDBISxx
FPUSHANDBISxx:

Syntax:

Description:

The FPUSHANDBISxx is a single operation having the effect of an FPUSHxx operation followed by an SANDBIS operation. Explicitly, the logical operations are as follows:

Stack before FPUSHANDBISxx:

High Condition Low Condition
A B Top
C D Next

Stack after FPUSHANDBISxx:

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 1 A B
Next 2 C D
If BS3 = 2 (high) Top (([Rs0].H*[Rs1].H) op [Rs2].H) & A (([Rs0].H*[Rs1].H) op [Rs2].H) & B
Next 1 A B
Next 2 C D
If BS3 = 3 (vector) Top (([Rs0].H*[Rs1].H) op [Rs2].H) & A ((([Rs0].L*[Rs1].L) op [Rs2].L) & B
Next 1 A B
Next 2 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).

Microcode Pattern:

Takes 9 cycles to execute.
    Example: FPUSHANDBIS 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
PA2xx  -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
--------------------------------------------------------------------

Where: xx is one of {EQ,NE,LE,LT,GE,GT}.

Exceptions :

The exceptions are the same as the ones of the FNORM operations

Example :

!! 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

FPUSHANDBISEQ 255 3 0xD 0xE 0xF  !! Pushes: High = TRUE & A  Low = FALSE & B
FPUSHANDBISEQ 255 2 0xD 0xE 0xF  !! Pushes: High = TRUE & A  Low = TRUE & B
FPUSHANDBISEQ 255 1 0xD 0xE 0xF  !! Pushes: High = FALSE & A Low = FALSE & B

APE Group Zeuthen. 2003
$Id: fpushandbis_masm.php,v 1.2 2004/08/04 09:45:20 noe Exp $
$Id: syntax.php,v 1.8 2004/08/04 09:25:34 noe Exp $