XMM   ..



Most XMM instructions apply on Packed Data which are 128 bits long. This is to say, in practice, packets of 2 qWords, or 4 dWords, or 8 Words, or 16 Bytes.


For Memory pointing to this kind of Data, the standard keyword is 'OctoWord'. What is implemented, in RosAsm as, for example:


addpd  XMM0  O§MyOctoWord


As 'O' may easily be confused with 'Q', and as the pointed memory is not really an OctoWord but a Packed of Data (none being OctoWord sized), in accordance with the NASM developers, I have implemented too 'X' (for Xmm, for undefined,...):


addpd  XMM0  X§MyOctoWord


These two notations are available. 'X' notation is also available for other ''irregular'' sizes addressing (FPU).


       FSAVE  >>>  108 bytes mem

       FLDENV >>>    28 bytes mem

       FRSTOR >>>  180 bytes mem

       FSTENV >>>    28 bytes mem



The comparison instructions for XMM (CMPPS / CMPPD / CMPSS / CMPSD) have a 3 members encodage, with a really demential encodage:


cmpps  XMM1  XMM2  imm8


''imm8'' is a immediate value (from 0 to 7) telling what kind of comparison is to be performed, which are:


1 = EQ (Equal)

2 = LT (Less Than)

3 = LE (Less Than or Equal) UNORDed

4 = NEQ (Not Equal)

5 = NLT (Not Less Than)

6 = NLE (Not Less or Equal)

7 = ORD (Ordered)


The Mnemonics forms I implemented for these are, (example for: CMPPS, same for the others):


CMPPSEA / CMPPSLT / CMPPSLE

CMPPSNEQ / CMPPSNLT / CMPPSNLE

CMPPSORD /CMPPSUNORD


... More readable with '_':


CMP_PS_EA / CMP_PS_LT / CMP_PS_LE

CMP_PS_NEQ / CMP_PS_NLT / CMP_PS_NLE

CMP_PS_ORD / CMP_PS_UNORD


And, for compatibility with other Compilers:


CMP_EA_PS / CMP_LT_PS / CMP_LE_PS_LE

CMP_NEQ_PS / CMP_NLT_PS / CMP_NLE_PS

CMP_ORD_PS / CMP_UNORD_PS


Which achieves into _3_ (!!!...) different forms for these awfully designed Instructions, that are all computed by the Assembler. Example of 3 forms producing the same encodage.


CMPPD xmm1 X$Data 5

CMP_PD_NLE xmm1 X$Data

CMP_NLE_PD xmm1 X$Data



Declaring Data with 'X$' / 'O$' doesn't make any sense as Octowords Data size do not really exist. Declare the Data for what they really are. XMM Packed Data must be 128 bits aligned:


[<16 MyPackedData: D$ 0 0 0 0]

[<010 MyPackedData: D$ 0 0 0 0]

[<0010000 MyPackedData: D$ 0 0 0 0]

~~~~~~~