%constinteger Invert Cond = 16_E000 0000

%constinteger Cond EQ = 16_0000 0000 !! Invert Cond,
              Cond NE = 16_1000 0000 !! Invert Cond,
              Cond CS = 16_2000 0000 !! Invert Cond,
              Cond CC = 16_3000 0000 !! Invert Cond,
              Cond MI = 16_4000 0000 !! Invert Cond,
              Cond PL = 16_5000 0000 !! Invert Cond,
              Cond VS = 16_6000 0000 !! Invert Cond,
              Cond VC = 16_7000 0000 !! Invert Cond,
              Cond HI = 16_8000 0000 !! Invert Cond,
              Cond LS = 16_9000 0000 !! Invert Cond,
              Cond GE = 16_A000 0000 !! Invert Cond,
              Cond LT = 16_B000 0000 !! Invert Cond,
              Cond GT = 16_C000 0000 !! Invert Cond,
              Cond LE = 16_D000 0000 !! Invert Cond,
              Cond AL = 16_E000 0000 !! Invert Cond,
              Cond NV = 16_F000 0000 !! Invert Cond

{The Invert Cond is to make ALWAYS default to 0 internally}

%constinteger Post Indexed = 16_0100 0000,
              Reg Index    = 16_0200 0000,
              Write Back   = 1<<21,
              Byte Op      = 1<<22,
              Scc          = 1<<20

%constinteger IA = 16_0080 0000,     {increment after}
              IB = 16_0180 0000,     {increment before}
              DA = 16_0000 0000,     {decrement after}
              DB = 16_0100 0000      {decrement before}

%constinteger Logical Left     = 2_000<<4,
              Logical Right    = 2_010<<4,
              Arithmetic Right = 2_100<<4,
              Rotate Right     = 2_110<<4

%constinteger Logical Left R     = 2_1001<<4,
              Logical Right R    = 2_1011<<4,
              Arithmetic Right R = 2_1101<<4,
              Rotate Right R     = 2_1111<<4

%constinteger ADD = 16_4 << 21,
              ADC = 16_5 << 21,
              SUB = 16_2 << 21,
              SBC = 16_6 << 21,
              RSB = 16_3 << 21,
              RSC = 16_7 << 21,
              CMP = 16_A << 21 ! Scc,
              CMN = 16_B << 21 ! Scc,
              AND = 16_0 << 21,
              EOR = 16_1 << 21,
              ORR = 16_C << 21,
              BIC = 16_E << 21,
              TST = 16_8 << 21 ! Scc,
              TEQ = 16_9 << 21 ! Scc,
              MOV = 16_D << 21,
              MVN = 16_F << 21

%constinteger LDR = 16_0410 0000,
              STR = 16_0400 0000

%constinteger SWI = 16_0F00 0000

%constinteger LDM = 16_0810 0000,
              STM = 16_0800 0000

%constinteger B   = 16_0A00 0000,
              BL  = 16_0B00 0000

{Floating-point ops}

%constinteger LDFD = 2_ 00001100 0 0 0 1 0000 1000 0001 00000000,
              LDFS = 2_ 00001100 0 0 0 1 0000 0000 0001 00000000,
              STFD = 2_ 00001100 0 0 0 0 0000 1000 0001 00000000,
              STFS = 2_ 00001100 0 0 0 0 0000 0000 0001 00000000

%constinteger FLT = 2_ 00001110 000 0    1000 0000 0001 0001 0000,
              FIX = 2_ 00001110 000 1    1000 0000 0001 0001 0000

%constinteger CMF = 2_ 00001110 100 1 0000 1111 0001 0001 0000,
              CNF = 2_ 00001110 101 1 0000 1111 0001 0001 0000

%constinteger Small Constant = 8

!These are the extended-mode functions
!%constinteger ADF = 2_ 00001110 0000 1000 0000 0001 0000 0000,
!              MUF = 2_ 00001110 0001 1000 0000 0001 0000 0000,
!              SUF = 2_ 00001110 0010 1000 0000 0001 0000 0000,
!              RSF = 2_ 00001110 0011 1000 0000 0001 0000 0000,
!              DVF = 2_ 00001110 0100 1000 0000 0001 0000 0000,
!              RDF = 2_ 00001110 0101 1000 0000 0001 0000 0000,
!              POW = 2_ 00001110 0110 1000 0000 0001 0000 0000,
!              RPW = 2_ 00001110 0111 1000 0000 0001 0000 0000,
!              RMF = 2_ 00001110 1000 1000 0000 0001 0000 0000,
!              POL = 2_ 00001110 1100 1000 0000 0001 0000 0000,
!              MVF = 2_ 00001110 0000 1000 1000 0001 0000 0000,
!              MNF = 2_ 00001110 0001 1000 1000 0001 0000 0000,
!              ABS = 2_ 00001110 0010 1000 1000 0001 0000 0000,
!              SQT = 2_ 00001110 0100 1000 1000 0001 0000 0000,
!              LOG = 2_ 00001110 0101 1000 1000 0001 0000 0000,
!              LGN = 2_ 00001110 0110 1000 1000 0001 0000 0000,
!              EXP = 2_ 00001110 0111 1000 1000 0001 0000 0000,
!              SIN = 2_ 00001110 1000 1000 1000 0001 0000 0000,
!              COS = 2_ 00001110 1001 1000 1000 0001 0000 0000,
!              TAN = 2_ 00001110 1010 1000 1000 0001 0000 0000,
!              ASN = 2_ 00001110 1011 1000 1000 0001 0000 0000,
!              ACS = 2_ 00001110 1100 1000 1000 0001 0000 0000,
!              ATN = 2_ 00001110 1101 1000 1000 0001 0000 0000,
!              FML = 2_ 00001110 1001 0000 0000 0001 1000 0000,
!              FDV = 2_ 00001110 1010 0000 0000 0001 1000 0000,
!              FRD = 2_ 00001110 1011 0000 0000 0001 1000 0000,
!              RND = 2_ 00001110 0011 0000 1000 0001 1000 0000
!
!These are the double-precision functions
%constinteger ADF = 2_ 00001110 0000 0000 0000 0001 1000 0000,
              MUF = 2_ 00001110 0001 0000 0000 0001 1000 0000,
              SUF = 2_ 00001110 0010 0000 0000 0001 1000 0000,
              RSF = 2_ 00001110 0011 0000 0000 0001 1000 0000,
              DVF = 2_ 00001110 0100 0000 0000 0001 1000 0000,
              RDF = 2_ 00001110 0101 0000 0000 0001 1000 0000,
              POW = 2_ 00001110 0110 0000 0000 0001 1000 0000,
              RPW = 2_ 00001110 0111 0000 0000 0001 1000 0000,
              RMF = 2_ 00001110 1000 0000 0000 0001 1000 0000,
              POL = 2_ 00001110 1100 0000 0000 0001 1000 0000,
              MVF = 2_ 00001110 0000 0000 1000 0001 1000 0000,
              MNF = 2_ 00001110 0001 0000 1000 0001 1000 0000,
              ABS = 2_ 00001110 0010 0000 1000 0001 1000 0000,
              SQT = 2_ 00001110 0100 0000 1000 0001 1000 0000,
              LOG = 2_ 00001110 0101 0000 1000 0001 1000 0000,
              LGN = 2_ 00001110 0110 0000 1000 0001 1000 0000,
              EXP = 2_ 00001110 0111 0000 1000 0001 1000 0000,
              SIN = 2_ 00001110 1000 0000 1000 0001 1000 0000,
              COS = 2_ 00001110 1001 0000 1000 0001 1000 0000,
              TAN = 2_ 00001110 1010 0000 1000 0001 1000 0000,
              ASN = 2_ 00001110 1011 0000 1000 0001 1000 0000,
              ACS = 2_ 00001110 1100 0000 1000 0001 1000 0000,
              ATN = 2_ 00001110 1101 0000 1000 0001 1000 0000,
              FML = 2_ 00001110 1001 0000 0000 0001 1000 0000,
              FDV = 2_ 00001110 1010 0000 0000 0001 1000 0000,
              FRD = 2_ 00001110 1011 0000 0000 0001 1000 0000,
              RND = 2_ 00001110 0011 0000 1000 0001 1000 0000
