2003-09-19 Michael Snyder <msnyder@redhat.com>
[deliverable/binutils-gdb.git] / cpu / frv.cpu
index 82a88172835509aae0e5a8102ab7b4968c45f884..8c33d96d77d6e6ddedafad49aef17f063a46c4f5 100644 (file)
@@ -1,6 +1,6 @@
 ; Fujitsu FRV opcode support, for GNU Binutils.  -*- Scheme -*-
 ;
-; Copyright 2000, 2001 Free Software Foundation, Inc.
+; Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
 ;
 ; Contributed by Red Hat Inc; developed under contract from Fujitsu.
 ;
        () ; outputs
        () ; profile action (default)
        )
+  ; Clrgr unit
+  (unit u-clrgr "Clrgr Unit" ()
+       1 1 ; issue done
+       () ; state
+       ((GRk INT -1)) ; inputs
+       () ; outputs
+       () ; profile action (default)
+       )
+  ; Clrfr unit
+  (unit u-clrfr "Clrfr Unit" ()
+       1 1 ; issue done
+       () ; state
+       ((FRk INT -1)) ; inputs
+       () ; outputs
+       () ; profile action (default)
+       )
   ; GR set half unit
   (unit u-set-hilo "GR Set Half" ()
        1 1 ; issue done
   (type enum)
   (name UNIT)
   (comment "parallel execution pipeline selection")
-  ; The order of declaration is significant. Keep variations on the same unit
-  ; together and keep the '01' variation last within each unit.
+  ; The order of declaration is significant. 
+  ; See the *_unit_mapping tables in frv.opc
+  ; Keep variations on the same unit together.
+  ; Keep the '01' variant immediately after the '1' variant in each unit.
+  ; Keep the 'ALL' variations immediately after the last numbered variant in each unit.
   (values NIL
-         I0 I1 I01
-         FM0 FM1 FM01
+         I0 I1 I01 IALL
+         FM0 FM1 FM01 FMALL FMLOW
          B0 B1 B01
          C
          MULT-DIV ; multiply/division slotted differently on different machines
          LOAD     ; loads             slotted differently on different machines
+         STORE    ; store             slotted differently on different machines
+         SCAN     ; scan, scani       slotted differently on different machines
+         DCPL     ; dcpl              slotted differently on different machines
+         MDUALACC ; media dual acc    slotted differently on different machines
+         MCLRACC-1; mclracc A==1      slotted differently on different machines
          NUM_UNITS
   )
 )
   (name PRESERVE-OVF)
   (comment "Preserve value of MSR.OVF")
 )
-; null attribute -- used as a place holder for where an attribue it required.
+; null attribute -- used as a place holder for where an attribue is required.
 (define-attr
   (for insn)
   (type boolean)
   (comment "placeholder attribute")
   (attrs META) ; do not define in any generated file for now
 )
+
+; IDOC attribute for instruction documentation.
+
+(define-attr
+  (for insn)
+  (type enum)
+  (name IDOC)
+  (comment "insn kind for documentation")
+  (attrs META)
+  (values
+   (MEM - () "Memory")
+   (ALU - () "ALU")
+   (FPU - () "FPU")
+   (BR - () "Branch")
+   (PRIV - () "Priviledged")
+   (MISC - () "Miscellaneous")
+  )
+)
 \f
 ; Instruction fields.
 ;
 
 (define-hardware
   (name h-fccr)
-  (comment "Integer condition code registers")
+  (comment "Floating point condition code registers")
   (attrs PROFILE)
   (type register UQI (4))
   (indices extern-keyword fccr-names)
 (dnmop CPRdoublek "destination register"   ((MACH frv)) h-cpr_double f-CPRk DI)
 
 ; floating point operands
-(dnmop FRinti    "source register 1"      () h-fr_int        f-FRi SI)
-(dnmop FRintj    "source register 2"      () h-fr_int        f-FRj SI)
-(dnmop FRintk    "target register"        () h-fr_int        f-FRk SI)
+(dnmop FRinti    "source register 1"      () h-fr_int    f-FRi SI)
+(dnmop FRintj    "source register 2"      () h-fr_int    f-FRj SI)
+(dnmop FRintk    "target register"        () h-fr_int    f-FRk SI)
 (dnmop FRi       "source register 1"      () h-fr        f-FRi SF)
 (dnmop FRj       "source register 2"      () h-fr        f-FRj SF)
 (dnmop FRk       "destination register"   () h-fr        f-FRk SF)
 (dnop LI      "link indicator"            () h-uint f-LI)
 (dnop lock    "cache lock indicator"      (HASH-PREFIX) h-uint f-lock)
 (dnop debug   "debug mode indicator"      (HASH-PREFIX) h-uint f-debug)
-(dnop A       "all accumulator indicator" (HASH-PREFIX) h-uint f-A)
 (dnop ae      "all entries indicator"     (HASH-PREFIX) h-uint f-ae)
 
 (dnop label16  "18 bit pc relative address" () h-iaddr f-label16)
 (dnop label24  "26 bit pc relative address" () h-iaddr f-label24)
 
+(define-operand
+  (name A0)
+  (comment "A==0 operand of mclracc")
+  (attrs)
+  (type h-uint)
+  (index f-A)
+  (mode USI)
+  (handlers (parse "A0"))
+)
+
+(define-operand
+  (name A1)
+  (comment "A==1 operand of mclracc")
+  (attrs)
+  (type h-uint)
+  (index f-A)
+  (mode USI)
+  (handlers (parse "A1"))
+)
+
+(define-operand
+  (name FRintieven)
+  (comment "(even) source register 1")
+  (attrs)
+  (type h-fr_int)
+  (index f-FRi)
+  (mode SI)
+  (handlers (parse "even_register"))
+)
+
+(define-operand
+  (name FRintjeven)
+  (comment "(even) source register 2")
+  (attrs)
+  (type h-fr_int)
+  (index f-FRj)
+  (mode SI)
+  (handlers (parse "even_register"))
+)
+
+(define-operand
+  (name FRintkeven)
+  (comment "(even) target register")
+  (attrs)
+  (type h-fr_int)
+  (index f-FRk)
+  (mode SI)
+  (handlers (parse "even_register"))
+)
+
 (define-operand
   (name d12)
   (comment "12 bit signed immediate")
   (trunc BI (and icc #x1))
 )
 
-; FRV specific insn attributes:
+; FRV insns
+;
 ;
-
 ; Format: INT, Logic, Shift r-r
 ;
 (define-pmacro (int-logic-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$GRj,$GRk")
        (+ pack GRk op GRi (ICCi_1-null) ope GRj)
        (set GRk (operation GRi GRj))
 
 (dni not
      ("not")
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      ("not$pack $GRj,$GRk")
      (+ pack GRk OP_01 (rs-null) (ICCi_1-null) OPE2_06 GRj)
      (set GRk (inv GRj))
 (define-pmacro (int-shift-r-r name op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$GRj,$GRk")
        (+ pack GRk op GRi (ICCi_1-null) ope GRj)
        (set GRk (name GRi (and GRj #x1f)))
 
 (dni scan
      "scan"
-     ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT SCAN) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "scan$pack $GRi,$GRj,$GRk"
      (+ pack GRk OP_0B GRi (ICCi_1-null) OPE2_00 GRj)
      (scan-semantics GRi GRj GRk)
 (define-pmacro (conditional-int-logic name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
        (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
        (+ pack GRk op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
 
 (dni cnot
      "conditional not"
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
      "cnot$pack $GRj,$GRk,$CCi,$cond"
      (+ pack GRk OP_5A (rs-null) CCi cond OPE4_3 GRj)
      (if (eq CCi (or cond 2))
 (define-pmacro (conditional-shift name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
        (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
        (+ pack GRk op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
 
 (dni cscan
      "conditional scan"
-     ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+     ((UNIT SCAN) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
      "cscan$pack $GRi,$GRj,$GRk,$CCi,$cond"
      (+ pack GRk OP_65 GRi CCi cond OPE4_3 GRj)
      (if (eq CCi (or cond 2))
 (define-pmacro (int-arith-cc-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 ope GRj)
        (int-arith-cc-semantics operation ICCi_1)
 (define-pmacro (int-logic-cc-r-r name op ope comment)
   (dni (.sym name cc)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 ope GRj)
        (int-logic-cc-semantics name ICCi_1)
 (define-pmacro (int-shift-cc-r-r name l-r op ope comment)
   (dni (.sym name cc)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 ope GRj)
        (int-shift-cc-semantics name l-r ICCi_1)
 (define-pmacro (conditional-int-arith-cc name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
        (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
        (+ pack GRk op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
 (define-pmacro (conditional-int-logic-cc name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
        (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
        (+ pack GRk op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
 (define-pmacro (conditional-int-shift-cc name l-r op ope comment)
   (dni (.sym c name cc)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
        (.str (.sym c name cc) "$pack $GRi,$GRj,$GRk,$CCi,$cond")
        (+ pack GRk op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
 (define-pmacro (int-arith-x-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 ope GRj)
        (set GRk ((.sym operation c) GRi GRj (cbit ICCi_1)))
 (define-pmacro (int-arith-x-cc-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 ope GRj)
        (sequence ((WI tmp) (QI cc))
 (define-pmacro (int-logic-r-simm name operation op comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$s12,$GRk")
        (+ pack GRk op GRi s12)
        (set GRk (operation GRi s12))
 (define-pmacro (int-shift-r-simm name op comment)
   (dni (.sym name i)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str (.sym name i) "$pack $GRi,$s12,$GRk")
        (+ pack GRk op GRi s12)
        (set GRk (name GRi (and s12 #x1f)))
 
 (dni scani
      "scan immediate"
-     ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT SCAN) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "scani$pack $GRi,$s12,$GRk"
      (+ pack GRk OP_47 GRi s12)
      (scan-semantics GRi s12 GRk)
 (define-pmacro (int-arith-cc-r-simm name operation op comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 s10)
        (sequence ((BI tmp) (QI cc) (SI result))
 (define-pmacro (int-logic-cc-r-simm name op comment)
   (dni (.sym name icc)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 s10)
        (sequence ((SI tmp))
 (define-pmacro (int-shift-cc-r-simm name l-r op comment)
   (dni (.sym name icc)
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 s10)
        (sequence ((WI shift) (SI tmp) (QI cc))
 (define-pmacro (int-arith-x-r-simm name operation op comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 s10)
        (set GRk ((.sym operation c) GRi s10 (cbit ICCi_1)))
 (define-pmacro (int-arith-x-cc-r-simm name operation op comment)
   (dni name
        (comment)
-       ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+       ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
        (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
        (+ pack GRk op GRi ICCi_1 s10)
        (sequence ((WI tmp) (QI cc))
 
 (dni cmpb
      "Compare bytes"
-     ((UNIT I01) (FR400-MAJOR I-1) (MACH fr400))
+     ((UNIT IALL) (FR400-MAJOR I-1) (MACH fr400))
      "cmpb$pack $GRi,$GRj,$ICCi_1"
      (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0C GRj)
      (sequence ((QI cc))
 
 (dni cmpba
      "OR of Compare bytes"
-     ((UNIT I01) (FR400-MAJOR I-1) (MACH fr400))
+     ((UNIT IALL) (FR400-MAJOR I-1) (MACH fr400))
      "cmpba$pack $GRi,$GRj,$ICCi_1"
      (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0D GRj)
      (sequence ((QI cc))
 ;
 (dni setlo
      "set low order bits"
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "setlo$pack $ulo16,$GRklo"
      (+ pack GRk OP_3D (misc-null-4) u16)
      (set GRklo u16)
 
 (dni sethi
      "set high order bits"
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "sethi$pack $uhi16,$GRkhi"
      (+ pack GRkhi OP_3E (misc-null-4) u16)
      (set GRkhi u16)
 
 (dni setlos
      "set low order bits and extend sign"
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "setlos$pack $slo16,$GRk"
      (+ pack GRk OP_3F (misc-null-4) s16)
      (set GRk s16)
   )
 )
 
-(ne-load-quad-r-simm nldqi  OP_46 GR    (ne-XI-size) 0 NA
-                    ((fr500 (unit u-gr-load))) "Load quad word")
 (ne-load-quad-r-simm nldqfi OP_4C FRint (ne-XI-size) 1 FR-ACCESS
                     ((fr500 (unit u-fr-load))) "Load quad float")
 
 (define-pmacro (store-r-r name mode op ope reg attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" reg "k,@($GRi,$GRj)")
        (+ pack (.sym reg k) op GRi ope GRj)
        (c-call VOID (.str "@cpu@_write_mem_" mode)
 (define-pmacro (r-store name mode op ope reg size is_float profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv))
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv))
        (.str name "$pack $" reg "k,@($GRi,$GRj)")
        (+ pack (.sym reg k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (store-double-r-r name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
                name mode op ope regtype is_float attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (store-quad-r-r name op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (r-store-quad name op ope regtype is_float attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (store-r-r-u name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((UWI address))
                name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (store-quad-r-r-u name op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj)")
        (+ pack (.sym regtype k) op GRi ope GRj)
        (sequence ((WI address))
 (define-pmacro (conditional-store name mode op ope regtype profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL)
        (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
        (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
        (if (eq CCi (or cond 2))
                name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
        (+ pack (.sym regtype k) op GRi CCi  cond ope GRj)
        (if (eq CCi (or cond 2))
 
 (dni cstq
      "conditionally store quad word"
-     ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) CONDITIONAL)
+     ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) CONDITIONAL)
      "cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond"
      (+ pack GRk OP_65 GRi CCi cond OPE4_0 GRj)
      (if (eq CCi (or cond 2))
                name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
        (+ pack (.sym regtype k) op GRi CCi  cond ope GRj)
        (if (eq CCi (or cond 2))
                name mode op ope regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
        (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
        (+ pack (.sym regtype k) op GRi CCi  cond ope GRj)
        (if (eq CCi (or cond 2))
 (define-pmacro (store-r-simm name mode op regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" regtype "k,@($GRi,$d12)")
        (+ pack (.sym regtype k) op GRi d12)
        (c-call VOID (.str "@cpu@_write_mem_" mode)
 (define-pmacro (store-double-r-simm name mode op regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
        (.str name "$pack $" regtype "k,@($GRi,$d12)")
        (+ pack (.sym regtype k) op GRi d12)
        (sequence ((WI address))
 (define-pmacro (store-quad-r-simm name op regtype attr profile comment)
   (dni name
        (comment)
-       ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+       ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr)
        (.str name "$pack $" regtype "k,@($GRi,$d12)")
        (+ pack (.sym regtype k) op GRi d12)
        (sequence ((WI address))
 )
 
 (define-pmacro (register-transfer
-               name op ope reg_src reg_targ pipe major1 major2 attr1 attr2
-               profile comment)
+               name op ope reg_src reg_targ pipe attrs profile comment)
   (dni name
        (comment)
-       ((UNIT pipe) major1 major2 attr1 attr2)
+       (.splice (UNIT pipe) (.unsplice attrs))
        (.str name "$pack $" reg_src ",$" reg_targ)
        (+ pack reg_targ op (rs-null) ope reg_src)
        (set reg_targ reg_src)
 )
 
 (register-transfer movgf OP_03 OPE1_15
-                  GRj FRintk I0 (FR500-MAJOR I-4) (FR400-MAJOR I-4)
-                  FR-ACCESS NA
+                  GRj FRintk I0
+                  ((FR500-MAJOR I-4) (FR400-MAJOR I-4) FR-ACCESS)
                   ((fr400 (unit u-gr2fr)) (fr500 (unit u-gr2fr)))
                   "transfer gr to fr")
 (register-transfer movfg OP_03 OPE1_0D
-                  FRintk GRj I0 (FR500-MAJOR I-4) (FR400-MAJOR I-4)
-                  FR-ACCESS NA
+                  FRintk GRj I0
+                  ((FR500-MAJOR I-4) (FR400-MAJOR I-4) FR-ACCESS)
                   ((fr400 (unit u-fr2gr)) (fr500 (unit u-fr2gr)))
                   "transfer fr to gr")
 
 )
 
 (define-pmacro (conditional-register-transfer
-               name op ope reg_src reg_targ pipe major1 major2 mach
-               profile comment)
+               name op ope reg_src reg_targ pipe attrs profile comment)
   (dni name
        (comment)
-       ((UNIT pipe) major1 major2 CONDITIONAL FR-ACCESS mach)
+       (.splice (UNIT pipe) CONDITIONAL FR-ACCESS (.unsplice attrs))
        (.str name "$pack $" reg_src ",$" reg_targ ",$CCi,$cond")
        (+ pack reg_targ op (rs-null) CCi cond ope reg_src)
        (if (eq CCi (or cond 2))
 )
 
 (conditional-register-transfer cmovgf OP_69 OPE4_0 GRj FRintk I0
-                              (FR500-MAJOR I-4) (FR400-MAJOR I-4)
-                              NA
+                              ((FR500-MAJOR I-4) (FR400-MAJOR I-4))
                               ((fr400 (unit u-gr2fr)) (fr500 (unit u-gr2fr)))
                               "transfer gr to fr")
 (conditional-register-transfer cmovfg OP_69 OPE4_2 FRintk GRj I0
-                              (FR500-MAJOR I-4) (FR400-MAJOR I-4)
-                              NA
+                              ((FR500-MAJOR I-4) (FR400-MAJOR I-4))
                               ((fr400 (unit u-fr2gr)) (fr500 (unit u-fr2gr)))
                               "transfer fr to gr")
 
 (invalidate-TLB itlbi itlbi OP_03 OPE1_33 "invalidate insn TLB")
 (invalidate-TLB dtlbi dtlbi OP_03 OPE1_37 "invalidate data TLB")
 
-(define-pmacro (cache-preload name cache op ope profile comment)
+(define-pmacro (cache-preload name cache pipe attrs op ope profile comment)
   (dni name
        (comment)
-       ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+       (.splice (UNIT pipe) (FR500-MAJOR C-2) (FR400-MAJOR C-2) (.unsplice attrs))
        (.str name "$pack $GRi,$GRj,$lock")
        (+ pack (misc-null-1) lock op GRi ope GRj)
        (c-call VOID (.str "@cpu@_" cache "_cache_preload") GRi GRj lock)
   )
 )
 
-(cache-preload icpl insn OP_03 OPE1_30
+(cache-preload icpl insn C () OP_03 OPE1_30
               ((fr400 (unit u-icpl)) (fr500 (unit u-icpl)))
               "preload insn cache")
-(cache-preload dcpl data OP_03 OPE1_34
+(cache-preload dcpl data DCPL () OP_03 OPE1_34
               ((fr400 (unit u-dcpl)) (fr500 (unit u-dcpl)))
               "preload data cache")
 
   (c-call VOID "@cpu@_clear_ne_flags" target_index is_float)
 )
 
-(define-pmacro (clear-ne-flag-r name op ope reg is_float attr comment)
+(define-pmacro (clear-ne-flag-r name op ope reg is_float attr profile comment)
   (dni name
        (comment)
        ((UNIT I01) (FR500-MAJOR I-6) (MACH simple,tomcat,fr500,frv) attr)
        (.str name "$pack $" reg "k")
        (+ pack (.sym reg k) op (rs-null) ope (GRj-null))
-       (clear-ne-flag-semantics (index-of (.sym reg k)) is_float)
-       ()
+       (sequence ()
+                ; hack to get this referenced for profiling
+                (c-raw-call VOID "frv_ref_SI" (.sym reg k))
+                (clear-ne-flag-semantics (index-of (.sym reg k)) is_float))
+       profile
   )
 )
 
-(clear-ne-flag-r clrgr OP_0A OPE1_00 GR 0 NA        "Clear GR NE flag")
-(clear-ne-flag-r clrfr OP_0A OPE1_02 FR 1 FR-ACCESS "Clear FR NE flag")
+(clear-ne-flag-r clrgr OP_0A OPE1_00 GR 0 NA
+                ((fr500 (unit u-clrgr)))
+                "Clear GR NE flag")
+(clear-ne-flag-r clrfr OP_0A OPE1_02 FR 1 FR-ACCESS
+                ((fr500 (unit u-clrfr)))
+                "Clear FR NE flag")
 
-(define-pmacro (clear-ne-flag-all name op ope is_float attr comment)
+(define-pmacro (clear-ne-flag-all name op ope is_float attr profile comment)
   (dni name
        (comment)
        ((UNIT I01) (FR500-MAJOR I-6) (MACH simple,tomcat,fr500,frv) attr)
        (.str name "$pack")
        (+ pack (rd-null) op (rs-null) ope (GRj-null))
        (clear-ne-flag-semantics -1 is_float)
-       ()
+       profile
   )
 )
 
-(clear-ne-flag-all clrga OP_0A OPE1_01 0 NA        "Clear GR NE flag ALL")
-(clear-ne-flag-all clrfa OP_0A OPE1_03 1 FR-ACCESS "Clear FR NE flag ALL")
+(clear-ne-flag-all clrga OP_0A OPE1_01 0 NA
+                  ((fr500 (unit u-clrgr)))
+                  "Clear GR NE flag ALL")
+(clear-ne-flag-all clrfa OP_0A OPE1_03 1 FR-ACCESS
+                  ((fr500 (unit u-clrfr)))
+                  "Clear FR NE flag ALL")
 
 (define-pmacro (commit-semantics target_index is_float)
   (c-call VOID "@cpu@_commit" target_index is_float)
                name op ope conv mode src targ attr comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv) attr)
+       (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr))
        (.str name "$pack $" src ",$" targ)
        (+ pack targ op (rs-null) ope src)
        (set targ (conv mode src))
   )
 )
 
-(floating-point-conversion fitos OP_79 OPE1_00 float SF FRintj FRk NA "Convert Integer to Single")
-(floating-point-conversion fstoi OP_79 OPE1_01 fix   SI FRj FRintk NA "Convert Single  to Integer")
-(floating-point-conversion fitod OP_7A OPE1_00 float DF FRintj FRdoublek (MACH frv) "Convert Integer to Double")
-(floating-point-conversion fdtoi OP_7A OPE1_01 fix   SI FRdoublej FRintk (MACH frv) "Convert Double to Integer")
+(floating-point-conversion fitos OP_79 OPE1_00 float SF FRintj FRk
+                          ((MACH simple,tomcat,fr500,frv))
+                          "Convert Integer to Single")
+(floating-point-conversion fstoi OP_79 OPE1_01 fix   SI FRj FRintk
+                          ((MACH simple,tomcat,fr500,frv))
+                          "Convert Single  to Integer")
+(floating-point-conversion fitod OP_7A OPE1_00 float DF FRintj FRdoublek
+                          ((MACH frv))
+                          "Convert Integer to Double")
+(floating-point-conversion fdtoi OP_7A OPE1_01 fix   SI FRdoublej FRintk
+                          ((MACH frv))
+                          "Convert Double to Integer")
 
 (define-pmacro (floating-point-dual-conversion
                name op ope conv mode src src_hw targ targ_hw attr comment)
   (dni name
        (comment)
-       ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1) attr)
+       ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1) attr)
        (.str name "$pack $" src ",$" targ)
        (+ pack targ op (rs-null) ope src)
        (sequence ()
                name op ope conv mode src src_hw targ targ_hw attr comment)
   (dni name
        (comment)
-       ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1) NON-EXCEPTING attr)
+       ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1) NON-EXCEPTING attr)
        (.str name "$pack $" src ",$" targ)
        (+ pack targ op (rs-null) ope src)
        (sequence ()
                name op ope conv mode src targ comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+       ((UNIT FMALL) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
        (.str name "$pack $" src ",$" targ ",$CCi,$cond")
        (+ pack targ op (rs-null) CCi cond ope src)
        (if (eq CCi (or cond 2))
                name op ope conv mode src targ comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+       ((UNIT FMALL) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
        (.str name "$pack $" src ",$" targ)
        (+ pack targ op (rs-null) ope src)
        (sequence ()
 (ne-floating-point-conversion nfstoi OP_79 OPE1_21 fix   SI FRj FRintk "NE convert Single to Integer")
 
 (register-transfer fmovs OP_79 OPE1_02
-                  FRj FRk FM01 (FR500-MAJOR F-1) NA
-                  (MACH simple,tomcat,fr500,frv) NA
+                  FRj FRk FM01
+                  ((FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
                   ((fr500 (unit u-fr2fr)))
                   "Move Single Float")
 (register-transfer fmovd OP_7A OPE1_02
                   ; TODO -- unit doesn't handle extra register
-                  FRdoublej FRdoublek FM01 (FR500-MAJOR F-1) NA
-                  (MACH frv) NA
+                  FRdoublej FRdoublek FM01
+                  ((FR500-MAJOR F-1) (MACH frv))
                   ((fr500 (unit u-fr2fr)))
                   "Move Double Float")
 
 (dni fdmovs
      "Dual move single float"
-     ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+     ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1))
      "fdmovs$pack $FRj,$FRk"
      (+ pack FRk OP_79 (rs-null) OPE1_12 FRj)
      (sequence ()
 )
 
 (conditional-register-transfer cfmovs OP_6C OPE4_0 FRj FRk FM01
-                              (FR500-MAJOR F-1) NA
-                              (MACH simple,tomcat,fr500,frv)
+                              ((FR500-MAJOR F-1)
+                               (MACH simple,tomcat,fr500,frv))
                               ((fr500 (unit u-fr2fr)))
                               "Conditional move Single Float")
 
 (define-pmacro (floating-point-neg name src targ op ope attr comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-1) attr)
+       (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr))
        (.str name "$pack $" src ",$" targ)
        (+ pack src op (rs-null) ope targ)
        (set targ (neg src))
   )
 )
 
-(floating-point-neg fnegs FRj FRk OP_79 OPE1_03 (MACH simple,tomcat,fr500,frv) "Floating point negate, single")
-(floating-point-neg fnegd FRdoublej FRdoublek OP_7A OPE1_03 (MACH frv) "Floating point negate, double")
+(floating-point-neg fnegs FRj FRk OP_79 OPE1_03 ((MACH simple,tomcat,fr500,frv)) "Floating point negate, single")
+(floating-point-neg fnegd FRdoublej FRdoublek OP_7A OPE1_03 ((MACH frv)) "Floating point negate, double")
 
 (dni fdnegs
      "Floating point dual negate, single"
-     ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+     ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1))
      "fdnegs$pack $FRj,$FRk"
      (+ pack FRk OP_79 (rs-null) OPE1_13 FRj)
      (sequence ()
 
 (dni cfnegs
      "Conditional floating point negate, single"
-     ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
      "cfnegs$pack $FRj,$FRk,$CCi,$cond"
      (+ pack FRj OP_6C (rs-null) CCi cond OPE4_1 FRk)
      (if (eq CCi (or cond 2))
 (define-pmacro (float-abs name src targ op ope attr comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-1) attr)
+       (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr))
        (.str name "$pack $" src ",$" targ )
        (+ pack targ op (rs-null) ope src)
        (set targ (abs src))
   )
 )
 
-(float-abs fabss FRj FRk OP_79 OPE1_04 (MACH simple,tomcat,fr500,frv) "Float absolute value, single")
-(float-abs fabsd FRdoublej FRdoublek OP_7A OPE1_04 (MACH frv) "Float absolute value, double")
+(float-abs fabss FRj FRk OP_79 OPE1_04 ((MACH simple,tomcat,fr500,frv)) "Float absolute value, single")
+(float-abs fabsd FRdoublej FRdoublek OP_7A OPE1_04 ((MACH frv)) "Float absolute value, double")
 
 (dni fdabss
      "Floating point dual absolute value, single"
-     ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+     ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1))
      "fdabss$pack $FRj,$FRk"
      (+ pack FRk OP_79 (rs-null) OPE1_14 FRj)
      (sequence ()
 
 (dni cfabss
      "Conditional floating point absolute value, single"
-     ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
      "cfabss$pack $FRj,$FRk,$CCi,$cond"
      (+ pack FRj OP_6C (rs-null) CCi cond OPE4_2 FRk)
      (if (eq CCi (or cond 2))
      ((fr500 (unit u-float-sqrt)))
 )
 
-(define-pmacro (float-binary-op-s name operation op ope major comment)
+(define-pmacro (float-binary-op-s name pipe attr operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+       (.splice (UNIT pipe) (MACH simple,tomcat,fr500,frv) (.unsplice attr))
        (.str name "$pack $FRi,$FRj,$FRk")
        (+ pack FRk op FRi ope FRj)
        (set FRk (operation FRi FRj))
   )
 )
 
-(float-binary-op-s fadds add OP_79 OPE1_06 F-2 "add single float")
-(float-binary-op-s fsubs sub OP_79 OPE1_07 F-2 "sub single float")
-(float-binary-op-s fmuls mul OP_79 OPE1_08 F-3 "mul single float")
+(float-binary-op-s fadds FMALL ((FR500-MAJOR F-2)) add OP_79 OPE1_06 "add single float")
+(float-binary-op-s fsubs FMALL ((FR500-MAJOR F-2)) sub OP_79 OPE1_07 "sub single float")
+(float-binary-op-s fmuls FM01  ((FR500-MAJOR F-3)) mul OP_79 OPE1_08 "mul single float")
 
 (dni fdivs
      "div single float"
 (define-pmacro (float-binary-op-d name operation op ope major comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) (MACH frv))
+       ((UNIT FMALL) (FR500-MAJOR major) (MACH frv))
        (.str name "$pack $FRdoublei,$FRdoublej,$FRdoublek")
        (+ pack FRdoublek op FRdoublei ope FRdoublej)
        (set FRdoublek (operation FRdoublei FRdoublej))
 (float-binary-op-d fmuld mul OP_7A OPE1_08 F-3 "mul double float")
 (float-binary-op-d fdivd div OP_7A OPE1_09 F-4 "div double float")
 
-(define-pmacro (conditional-float-binary-op name operation op ope major comment)
+(define-pmacro (conditional-float-binary-op name pipe attr operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+       (.splice (UNIT pipe) (MACH simple,tomcat,fr500,frv)
+               (.unsplice attr))
        (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond")
        (+ pack FRk op FRi CCi cond ope FRj)
        (if (eq CCi (or cond 2))
   )
 )
 
-(conditional-float-binary-op cfadds add OP_6D OPE4_0 F-2 "cond add single")
-(conditional-float-binary-op cfsubs sub OP_6D OPE4_1 F-2 "cond sub single")
-(conditional-float-binary-op cfmuls mul OP_6E OPE4_0 F-3 "cond mul single")
-(conditional-float-binary-op cfdivs div OP_6E OPE4_1 F-4 "cond div single")
+(conditional-float-binary-op cfadds FMALL ((FR500-MAJOR F-2)) add OP_6D OPE4_0 "cond add single")
+(conditional-float-binary-op cfsubs FMALL ((FR500-MAJOR F-2)) sub OP_6D OPE4_1 "cond sub single")
+(conditional-float-binary-op cfmuls FM01  ((FR500-MAJOR F-3)) mul OP_6E OPE4_0 "cond mul single")
+(conditional-float-binary-op cfdivs FM01  ((FR500-MAJOR F-4)) div OP_6E OPE4_1 "cond div single")
 
-(define-pmacro (ne-float-binary-op name operation op ope major comment)
+(define-pmacro (ne-float-binary-op name pipe attr operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+       (.splice (UNIT pipe) (MACH simple,tomcat,fr500,frv)
+               (.unsplice attr))
        (.str name "$pack $FRi,$FRj,$FRk")
        (+ pack FRk op FRi ope FRj)
        (sequence ()
   )
 )
 
-(ne-float-binary-op nfadds add OP_79 OPE1_26 F-2 "ne add single")
-(ne-float-binary-op nfsubs sub OP_79 OPE1_27 F-2 "ne sub single")
-(ne-float-binary-op nfmuls mul OP_79 OPE1_28 F-3 "ne mul single")
-(ne-float-binary-op nfdivs div OP_79 OPE1_29 F-4 "ne div single")
+(ne-float-binary-op nfadds FMALL ((FR500-MAJOR F-2)) add OP_79 OPE1_26 "ne add single")
+(ne-float-binary-op nfsubs FMALL ((FR500-MAJOR F-2)) sub OP_79 OPE1_27 "ne sub single")
+(ne-float-binary-op nfmuls FM01  ((FR500-MAJOR F-3)) mul OP_79 OPE1_28 "ne mul single")
+(ne-float-binary-op nfdivs FM01  ((FR500-MAJOR F-4)) div OP_79 OPE1_29 "ne div single")
 
 (define-pmacro (fcc-eq) 8)
 (define-pmacro (fcc-lt) 4)
 
 (dni fcmps
      "compare single float"
-     ((UNIT FM01) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
      "fcmps$pack $FRi,$FRj,$FCCi_2"
      (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_0A FRj)
      (compare-and-set-fcc FRi FRj FCCi_2)
 
 (dni fcmpd
      "compare double float"
-     ((UNIT FM01) (FR500-MAJOR F-2) (MACH frv))
+     ((UNIT FMALL) (FR500-MAJOR F-2) (MACH frv))
      "fcmpd$pack $FRdoublei,$FRdoublej,$FCCi_2"
      (+ pack (cond-null) FCCi_2 OP_7A FRdoublei OPE1_0A FRdoublej)
      (compare-and-set-fcc FRdoublei FRdoublej FCCi_2)
 
 (dni cfcmps
      "Conditional compare single, float"
-     ((UNIT FM01) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
      "cfcmps$pack $FRi,$FRj,$FCCi_2,$CCi,$cond"
      (+ pack (cond-null) FCCi_2 OP_6D FRi CCi cond OPE4_2 FRj)
      (if (eq CCi (or cond 2))
 
 (dni fdcmps
      "float dual compare single"
-     ((UNIT FM01) (FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv))
      "fdcmps$pack $FRi,$FRj,$FCCi_2"
      (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_1A FRj)
      (sequence ()
 (define-pmacro (float-mul-with-add name add_sub arg1 arg2 targ op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+       ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv))
        (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
        (+ pack targ op arg1 ope arg2)
        (set targ (add_sub (mul arg1 arg2) targ))
 
 (dni fdmadds
      "Float dual multiply with add"
-     ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+     ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv))
      "fdmadds$pack $FRi,$FRj,$FRk"
      (+ pack FRk OP_79 FRi OPE1_1B FRj)
      (sequence ()
 
 (dni nfdmadds
      "Non excepting float dual multiply with add"
-     ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+     ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv))
      "nfdmadds$pack $FRi,$FRj,$FRk"
      (+ pack FRk OP_79 FRi OPE1_3B FRj)
      (sequence ()
                name add_sub arg1 arg2 targ op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv) CONDITIONAL)
        (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond")
        (+ pack FRk op FRi CCi cond ope FRj)
        (if (eq CCi (or cond 2))
 (define-pmacro (ne-float-mul-with-add name add_sub arg1 arg2 targ op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv) NON-EXCEPTING)
+       ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv) NON-EXCEPTING)
        (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
        (+ pack targ op arg1 ope arg2)
        (sequence ()
 (ne-float-parallel-mul-add nfmas add OP_79 OPE1_2E "ne parallel mul/add,single")
 (ne-float-parallel-mul-add nfmss sub OP_79 OPE1_2F "ne parallel mul/sub,single")
 
-(define-pmacro (float-dual-arith name major oper1 oper2 op ope attr comment)
+(define-pmacro (float-dual-arith name attr oper1 oper2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) attr)
+       (.splice (UNIT FM01) (.unsplice attr))
        (.str name "$pack $FRi,$FRj,$FRk")
        (+ pack FRk op FRi ope FRj)
        (sequence ()
   )
 )
 
-(float-dual-arith fdadds F-6 add add OP_79 OPE1_16 (MACH simple,tomcat,fr500,frv) "dual add, single")
-(float-dual-arith fdsubs F-6 sub sub OP_79 OPE1_17 (MACH simple,tomcat,fr500,frv) "dual sub, single")
-(float-dual-arith fdmuls F-7 mul mul OP_79 OPE1_18 (MACH simple,tomcat,fr500,frv) "dual mul, single")
-(float-dual-arith fddivs F-7 div div OP_79 OPE1_19 (MACH frv) "dual div,single")
-(float-dual-arith fdsads F-6 add sub OP_79 OPE1_1E (MACH simple,tomcat,fr500,frv) "dual add/sub, single")
+(float-dual-arith fdadds ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) add add OP_79 OPE1_16 "dual add, single")
+(float-dual-arith fdsubs ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) sub sub OP_79 OPE1_17 "dual sub, single")
+(float-dual-arith fdmuls ((FR500-MAJOR F-7) (MACH simple,tomcat,fr500,frv)) mul mul OP_79 OPE1_18 "dual mul, single")
+(float-dual-arith fddivs ((FR500-MAJOR F-7) (MACH frv))                     div div OP_79 OPE1_19 "dual div,single")
+(float-dual-arith fdsads ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) add sub OP_79 OPE1_1E "dual add/sub, single")
 
 (dni fdmulcs
      "Float dual cross multiply single"
      ((fr500 (unit u-float-dual-arith)))
 )
 
-(define-pmacro (ne-float-dual-arith name major oper1 oper2 op ope attr comment)
+(define-pmacro (ne-float-dual-arith name attr oper1 oper2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR major) attr)
+       (.splice (UNIT FM01) (.unsplice attr))
        (.str name "$pack $FRi,$FRj,$FRk")
        (+ pack FRk op FRi ope FRj)
        (sequence ()
   )
 )
 
-(ne-float-dual-arith nfdadds F-6 add add OP_79 OPE1_36 (MACH simple,tomcat,fr500,frv) "ne dual add, single")
-(ne-float-dual-arith nfdsubs F-6 sub sub OP_79 OPE1_37 (MACH simple,tomcat,fr500,frv) "ne dual sub, single")
-(ne-float-dual-arith nfdmuls F-7 mul mul OP_79 OPE1_38 (MACH simple,tomcat,fr500,frv) "ne dual mul, single")
-(ne-float-dual-arith nfddivs F-7 div div OP_79 OPE1_39 (MACH frv) "ne dual div,single")
-(ne-float-dual-arith nfdsads F-6 add sub OP_79 OPE1_3E (MACH simple,tomcat,fr500,frv) "ne dual add/sub, single")
+(ne-float-dual-arith nfdadds ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) add add OP_79 OPE1_36 "ne dual add, single")
+(ne-float-dual-arith nfdsubs ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) sub sub OP_79 OPE1_37 "ne dual sub, single")
+(ne-float-dual-arith nfdmuls ((FR500-MAJOR F-7) (MACH simple,tomcat,fr500,frv)) mul mul OP_79 OPE1_38 "ne dual mul, single")
+(ne-float-dual-arith nfddivs ((FR500-MAJOR F-7) (MACH frv))                     div div OP_79 OPE1_39 "ne dual div,single")
+(ne-float-dual-arith nfdsads ((FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv)) add sub OP_79 OPE1_3E "ne dual add/sub, single")
 
 (dni nfdcmps
      "non-excepting dual float compare"
 
 (dni mhsetlos
      "Media set lower signed 12 bits"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
      "mhsetlos$pack $u12,$FRklo"
      (+ pack FRklo OP_78 OPE1_20 u12)
      (set FRklo u12)
 
 (dni mhsethis
      "Media set upper signed 12 bits"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
      "mhsethis$pack $u12,$FRkhi"
      (+ pack FRkhi OP_78 OPE1_22 u12)
      (set FRkhi u12)
 
 (dni mhdsets
      "Media dual set halfword signed 12 bits"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
      "mhdsets$pack $u12,$FRintk"
      (+ pack FRintk OP_78 OPE1_24 u12)
      (sequence ()
 (define-pmacro (media-set-5 name hilo op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
        (.str name "$pack $s5,$FRk" hilo)
        (+ pack (.sym FRk hilo) op (FRi-null) ope (misc-null-11) s5)
        (set-5-semantics (.sym FRk hilo) s5)
 
 (dni mhdseth
      "Media dual set halfword upper 5 bits"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
      "mhdseth$pack $s5,$FRintk"
      (+ pack FRintk OP_78 (FRi-null) OPE1_25 (misc-null-11) s5)
      (sequence ()
 (define-pmacro (media-logic-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$FRintk")
        (+ pack FRintk op FRinti ope FRintj)
        (set FRintk (operation FRinti FRintj))
 (define-pmacro (conditional-media-logic name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond")
        (+ pack FRintk op FRinti CCi cond ope FRintj)
        (if (eq CCi (or cond 2))
 
 (dni mnot
      ("mnot")
-     ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
      ("mnot$pack $FRintj,$FRintk")
      (+ pack FRintk OP_7B (rs-null) OPE1_03 FRintj)
      (set FRintk (inv FRintj))
 
 (dni cmnot
      ("cmnot")
-     ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
      ("cmnot$pack $FRintj,$FRintk,$CCi,$cond")
      (+ pack FRintk OP_70 (rs-null) CCi cond OPE4_3 FRintj)
      (if (eq CCi (or cond 2))
 
 (dni mdcutssi
      "Media dual cut with signed saturation"
-     ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
-     "mdcutssi$pack $ACC40Si,$s6,$FRintk"
-     (+ pack FRintk OP_78 ACC40Si OPE1_0E s6)
+     ((UNIT FMLOW) (MACH fr400) (FR400-MAJOR M-2))
+     "mdcutssi$pack $ACC40Si,$s6,$FRintkeven"
+     (+ pack FRintkeven OP_78 ACC40Si OPE1_0E s6)
      (if (register-unaligned ACC40Si 2)
         (c-call VOID "@cpu@_media_acc_not_aligned")
-        (if (register-unaligned FRintk 2)
+        (if (register-unaligned FRintkeven 2)
             (c-call VOID "@cpu@_media_register_not_aligned")
             (sequence ()
-                      (set FRintk (c-call SI "@cpu@_media_cut_ss" ACC40Si s6))
-                      (set (nextreg h-fr_int FRintk 1)
+                      (set FRintkeven (c-call SI "@cpu@_media_cut_ss" ACC40Si s6))
+                      (set (nextreg h-fr_int FRintkeven 1)
                            (c-call SI "@cpu@_media_cut_ss"
                                    (nextreg h-acc40S ACC40Si 1) s6)))))
-     ((fr400 (unit u-media-4-acc-dual)))
+     ((fr400 (unit u-media-4-acc-dual
+                  (out FRintk FRintkeven))))
 )
 
 ; The (add (xxxx) (mul arg 0)) is a hack to get a reference to arg generated
 
 (dni maveh
      "Media dual average"
-     ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
      "maveh$pack $FRinti,$FRintj,$FRintk"
      (+ pack FRintk OP_7B FRinti OPE1_08 FRintj)
      (set FRintk (c-call SI "@cpu@_media_average" FRinti FRintj))
 (define-pmacro (media-dual-word-rotate-r-r name operation op ope comment)
   (dni name
        (comment)
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$u6,$FRintk")
-       (+ pack FRintk op FRinti ope u6)
-       (if (orif (register-unaligned FRinti 2)
-                (register-unaligned FRintk 2))
+       ((UNIT FMLOW) (MACH fr400) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$s6,$FRintkeven")
+       (+ pack FRintkeven op FRintieven ope s6)
+       (if (orif (register-unaligned FRintieven 2)
+                (register-unaligned FRintkeven 2))
           (c-call VOID "@cpu@_media_register_not_aligned")
           (sequence ()
-                    (set FRintk (operation FRinti (and u6 #x1f)))
-                    (set (nextreg h-fr_int FRintk 1)
-                         (operation (nextreg h-fr_int FRinti 1)
-                                    (and u6 #x1f)))))
-       ((fr400 (unit u-media-3-quad)))
+                    (set FRintkeven (operation FRintieven (and s6 #x1f)))
+                    (set (nextreg h-fr_int FRintkeven 1)
+                         (operation (nextreg h-fr_int FRintieven 1)
+                                    (and s6 #x1f)))))
+       ((fr400 (unit u-media-3-quad
+                    (in  FRinti FRintieven)
+                    (out FRintk FRintkeven))))
   )
 )
 
 
 (dni mcplhi
      "Media dual couple, halfword"
-     ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+     ((UNIT FMLOW) (MACH fr400) (FR400-MAJOR M-2))
      "mcplhi$pack $FRinti,$u6,$FRintk"
      (+ pack FRintk OP_78 FRinti OPE1_0C u6)
      (sequence ((HI arg1) (HI arg2) (HI shift))
 
 (dni mcpli
      "Media dual couple, word"
-     ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+     ((UNIT FMLOW) (MACH fr400) (FR400-MAJOR M-2))
      "mcpli$pack $FRinti,$u6,$FRintk"
      (+ pack FRintk OP_78 FRinti OPE1_0D u6)
      (sequence ((SI tmp) (SI shift))
 
 (dni msaths
      "Media dual saturation signed"
-     ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
      "msaths$pack $FRinti,$FRintj,$FRintk"
      (+ pack FRintk OP_7B FRinti OPE1_0C FRintj)
      (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo))
 
 (dni mqsaths
      "Media quad saturation signed"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
-     "mqsaths$pack $FRinti,$FRintj,$FRintk"
-     (+ pack FRintk OP_78 FRinti OPE1_0F FRintj)
-     (if (orif (register-unaligned FRinti 2)
-              (orif (register-unaligned FRintj 2)
-                    (register-unaligned FRintk 2)))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
+     "mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven"
+     (+ pack FRintkeven OP_78 FRintieven OPE1_0F FRintjeven)
+     (if (orif (register-unaligned FRintieven 2)
+              (orif (register-unaligned FRintjeven 2)
+                    (register-unaligned FRintkeven 2)))
         (c-call VOID "@cpu@_media_register_not_aligned")
         (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo))
-                  ; hack to get FRintk referenced as a target for profiling
-                  (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
-                  (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
-                  (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 0))
-                  (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 0))
-                  (extract-hilo FRinti 1 FRintj 1 argihi argilo argjhi argjlo)
-                  (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 1))
-                  (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 1))))
-     ((fr400 (unit u-media-1-quad)))
+                  ; hack to get FRintkeven referenced as a target for profiling
+                  (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+                  (extract-hilo FRintieven 0 FRintjeven 0 argihi argilo argjhi argjlo)
+                  (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 0))
+                  (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 0))
+                  (extract-hilo FRintieven 1 FRintjeven 1 argihi argilo argjhi argjlo)
+                  (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 1))
+                  (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 1))))
+     ((fr400 (unit u-media-1-quad
+                  (in  FRinti FRintieven)
+                  (in  FRintj FRintjeven)
+                  (out FRintk FRintkeven))))
 )
 
 (define-pmacro (saturate-unsigned arg max result)
 
 (dni msathu
      "Media dual saturation unsigned"
-     ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
      "msathu$pack $FRinti,$FRintj,$FRintk"
      (+ pack FRintk OP_7B FRinti OPE1_0D FRintj)
      (sequence ((UHI argihi) (UHI argilo) (UHI argjhi) (UHI argjlo))
 (define-pmacro (media-dual-compare name mode op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$FCCk")
        (+ pack (cond-null) FCCk op FRinti ope FRintj)
        (if (register-unaligned FCCk 2)
 
 (dni mabshs
      "Media dual absolute value, halfword"
-     ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+     ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
      "mabshs$pack $FRintj,$FRintk"
      (+ pack FRintk OP_78 (FRi-null) OPE1_0A FRintj)
      (sequence ((HI arghi) (HI arglo))
 (define-pmacro (media-dual-arith-sat name operation mode max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$FRintk")
        (+ pack FRintk op FRinti ope FRintj)
        (media-dual-arith-sat-semantics operation mode max min)
                name operation mode max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond")
        (+ pack FRintk op FRinti CCi cond ope FRintj)
        (if (eq CCi (or cond 2))
 (conditional-media-dual-arith-sat cmsubhus sub UHI 65535      0 OP_71 OPE4_3 "Conditional Media dual sub unsigned with saturation")
 
 (define-pmacro (media-quad-arith-sat-semantics cond operation mode max min)
-  (if (orif (register-unaligned FRinti 2)
-           (orif (register-unaligned FRintj 2)
-                 (register-unaligned FRintk 2)))
+  (if (orif (register-unaligned FRintieven 2)
+           (orif (register-unaligned FRintjeven 2)
+                 (register-unaligned FRintkeven 2)))
       (c-call VOID "@cpu@_media_register_not_aligned")
       (if cond
          (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
-                   ; hack to get FRintk referenced as a target for profiling
-                   (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
-                   (extract-hilo FRinti 0 FRintj 0
+                   ; hack to get FRintkeven referenced as a target for profiling
+                   (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+                   (extract-hilo FRintieven 0 FRintjeven 0
                                  argihi argilo argjhi argjlo)
                    (media-arith-sat-semantics operation argihi argjhi
-                                              (halfword hi FRintk 0) mode
+                                              (halfword hi FRintkeven 0) mode
                                               max min (msr-sie-fri-hi))
                    (media-arith-sat-semantics operation argilo argjlo
-                                              (halfword lo FRintk 0) mode
+                                              (halfword lo FRintkeven 0) mode
                                               max min (msr-sie-fri-lo))
-                   (extract-hilo FRinti 1 FRintj 1
+                   (extract-hilo FRintieven 1 FRintjeven 1
                                  argihi argilo argjhi argjlo)
                    (media-arith-sat-semantics operation argihi argjhi
-                                              (halfword hi FRintk 1) mode
+                                              (halfword hi FRintkeven 1) mode
                                               max min  (msr-sie-fri-1-hi))
                    (media-arith-sat-semantics operation argilo argjlo
-                                              (halfword lo FRintk 1) mode
+                                              (halfword lo FRintkeven 1) mode
                                               max min (msr-sie-fri-1-lo)))))
 )
 
 (define-pmacro (media-quad-arith-sat name operation mode max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$FRintk")
-       (+ pack FRintk op FRinti ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven")
+       (+ pack FRintkeven op FRintieven ope FRintjeven)
        (media-quad-arith-sat-semantics 1 operation mode max min)
-       ((fr400 (unit u-media-1-quad))
-       (fr500 (unit u-media-quad-arith)))
+       ((fr400 (unit u-media-1-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)
+                    (out FRintk FRintkeven)))
+       (fr500 (unit u-media-quad-arith
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)
+                    (out FRintk FRintkeven))))
   )
 )
 
                name operation mode max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-2) CONDITIONAL)
-       (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond")
-       (+ pack FRintk op FRinti CCi cond ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-2) CONDITIONAL)
+       (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond")
+       (+ pack FRintkeven op FRintieven CCi cond ope FRintjeven)
        (media-quad-arith-sat-semantics (eq CCi (or cond 2))
                                       operation mode max min)
-       ((fr400 (unit u-media-1-quad))
-       (fr500 (unit u-media-quad-arith)))
+       ((fr400 (unit u-media-1-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)
+                    (out FRintk FRintkeven)))
+       (fr500 (unit u-media-quad-arith
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)
+                    (out FRintk FRintkeven))))
   )
 )
 
 (define-pmacro (media-acc-arith-sat name operation mode max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
        (.str name "$pack $ACC40Si,$ACC40Sk")
        (+ pack ACC40Sk op ACC40Si ope (ACCj-null))
        (if (register-unaligned ACC40Si 2)
                                         comment)
   (dni name
        (comment)
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+       ((UNIT MDUALACC) (MACH fr400) (FR400-MAJOR M-2))
        (.str name "$pack $ACC40Si,$ACC40Sk")
        (+ pack ACC40Sk op ACC40Si ope (ACCj-null))
        (if (register-unaligned ACC40Si 4)
 
 (dni masaccs
      "Media add and subtract signed accumulator with saturation"
-       ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (MACH fr400) (FR400-MAJOR M-1))
        "masaccs$pack $ACC40Si,$ACC40Sk"
        (+ pack ACC40Sk OP_78 ACC40Si OPE1_08 (ACCj-null))
        (if (register-unaligned ACC40Si 2)
 
 (dni mdasaccs
      "Media add and subtract signed accumulator with saturation"
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+       ((UNIT MDUALACC) (MACH fr400) (FR400-MAJOR M-2))
        "mdasaccs$pack $ACC40Si,$ACC40Sk"
        (+ pack ACC40Sk OP_78 ACC40Si OPE1_09 (ACCj-null))
        (if (register-unaligned ACC40Si 4)
 (define-pmacro (media-dual-multiply name mode conv rhs1 rhs2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) PRESERVE-OVF)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1) PRESERVE-OVF)
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
        (+ pack ACC40Sk op FRinti ope FRintj)
        (media-dual-multiply-semantics 1 mode conv rhs1 rhs2)
                name mode conv rhs1 rhs2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1)
        PRESERVE-OVF CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
        (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
 (define-pmacro (media-quad-multiply-semantics cond mode conv rhs1 rhs2)
   (if (register-unaligned ACC40Sk 4)
       (c-call VOID "@cpu@_media_acc_not_aligned")
-      (if (orif (register-unaligned FRinti 2)
-               (register-unaligned FRintj 2))
+      (if (orif (register-unaligned FRintieven 2)
+               (register-unaligned FRintjeven 2))
          (c-call VOID "@cpu@_media_register_not_aligned")
          (if cond
              (sequence ((mode argihi) (mode argilo)
                         (mode argjhi) (mode argjlo))
-                       (extract-hilo FRinti 0 FRintj 0
+                       (extract-hilo FRintieven 0 FRintjeven 0
                                      argihi argilo argjhi argjlo)
                        (media-multiply-semantics conv argihi rhs1 ACC40Sk)
                        (media-multiply-semantics conv argilo rhs2
                                                  (nextreg h-acc40S ACC40Sk 1))
-                       (extract-hilo FRinti 1 FRintj 1
+                       (extract-hilo FRintieven 1 FRintjeven 1
                                      argihi argilo argjhi argjlo)
                        (media-multiply-semantics conv argihi rhs1
                                                  (nextreg h-acc40S ACC40Sk 2))
 (define-pmacro (media-quad-multiply name mode conv rhs1 rhs2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2) PRESERVE-OVF)
-       (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
-       (+ pack ACC40Sk op FRinti ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2) PRESERVE-OVF)
+       (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+       (+ pack ACC40Sk op FRintieven ope FRintjeven)
        (media-quad-multiply-semantics 1 mode conv rhs1 rhs2) 
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-mul)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-mul
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))
   )
 )
 
                name mode conv rhs1 rhs2 op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2)
        PRESERVE-OVF CONDITIONAL)
-       (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
-       (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
+       (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond")
+       (+ pack ACC40Sk op FRintieven CCi cond ope FRintjeven)
        (media-quad-multiply-semantics (eq CCi (or cond 2)) mode conv rhs1 rhs2)
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-mul)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-mul
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))      
   )
 )
 
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$" res)
        (+ pack res op FRinti ope FRintj)
        (media-dual-multiply-acc-semantics 1 mode conv addop rhw res max min)
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$" res ",$CCi,$cond")
        (+ pack res op FRinti CCi cond ope FRintj)
        (media-dual-multiply-acc-semantics (eq CCi (or cond 2))
                cond mode conv addop rhw res max min)
   (if (register-unaligned res 4)
       (c-call VOID "@cpu@_media_acc_not_aligned")
-      (if (orif (register-unaligned FRinti 2)
-               (register-unaligned FRintj 2))
+      (if (orif (register-unaligned FRintieven 2)
+               (register-unaligned FRintjeven 2))
          (c-call VOID "@cpu@_media_register_not_aligned")
          (if cond
              (sequence ((mode argihi) (mode argilo)
                         (mode argjhi) (mode argjlo))
-                       (extract-hilo FRinti 0 FRintj 0
+                       (extract-hilo FRintieven 0 FRintjeven 0
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjhi
                                                      res
                        (media-multiply-acc-semantics conv argilo addop argjlo
                                                      (nextreg rhw res 1)
                                                      max min (msr-sie-acci-1))
-                       (extract-hilo FRinti 1 FRintj 1
+                       (extract-hilo FRintieven 1 FRintjeven 1
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjhi
                                                      (nextreg rhw res 2)
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$" res)
-       (+ pack res op FRinti ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$" res)
+       (+ pack res op FRintieven ope FRintjeven)
        (media-quad-multiply-acc-semantics 1 mode conv addop rhw res max min)
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-mul)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-mul
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))
   )
 )
 
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2) CONDITIONAL)
-       (.str name "$pack $FRinti,$FRintj,$" res ",$CCi,$cond")
-       (+ pack res op FRinti CCi cond ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2) CONDITIONAL)
+       (.str name "$pack $FRintieven,$FRintjeven,$" res ",$CCi,$cond")
+       (+ pack res op FRintieven CCi cond ope FRintjeven)
        (media-quad-multiply-acc-semantics (eq CCi (or cond 2))
                                          mode conv addop rhw res max min)
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-mul)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-mul
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))
   )
 )
 
                cond mode conv addop rhw res max min)
   (if (register-unaligned res 4)
       (c-call VOID "@cpu@_media_acc_not_aligned")
-      (if (orif (register-unaligned FRinti 2)
-               (register-unaligned FRintj 2))
+      (if (orif (register-unaligned FRintieven 2)
+               (register-unaligned FRintjeven 2))
          (c-call VOID "@cpu@_media_register_not_aligned")
          (if cond
              (sequence ((mode argihi) (mode argilo)
                         (mode argjhi) (mode argjlo))
-                       (extract-hilo FRinti 0 FRintj 0
+                       (extract-hilo FRintieven 0 FRintjeven 0
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjhi
                                                      (nextreg rhw res 2)
                        (media-multiply-acc-semantics conv argilo addop argjlo
                                                      (nextreg rhw res 3)
                                                      max min (msr-sie-acci-3))
-                       (extract-hilo FRinti 1 FRintj 1
+                       (extract-hilo FRintieven 1 FRintjeven 1
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjhi
                                                      res
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$" res)
-       (+ pack res op FRinti ope FRintj)
+       ((UNIT MDUALACC) (MACH fr400) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$" res)
+       (+ pack res op FRintieven ope FRintjeven)
        (media-quad-multiply-cross-acc-semantics 1 mode conv addop rhw res
                                                max min)
-       ((fr400 (unit u-media-2-quad)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))
   )
 )
 
                cond mode conv addop rhw res max min)
   (if (register-unaligned res 4)
       (c-call VOID "@cpu@_media_acc_not_aligned")
-      (if (orif (register-unaligned FRinti 2)
-               (register-unaligned FRintj 2))
+      (if (orif (register-unaligned FRintieven 2)
+               (register-unaligned FRintjeven 2))
          (c-call VOID "@cpu@_media_register_not_aligned")
          (if cond
              (sequence ((mode argihi) (mode argilo)
                         (mode argjhi) (mode argjlo))
-                       (extract-hilo FRinti 0 FRintj 0
+                       (extract-hilo FRintieven 0 FRintjeven 0
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjlo
                                                      (nextreg rhw res 2)
                        (media-multiply-acc-semantics conv argilo addop argjhi
                                                      (nextreg rhw res 3)
                                                      max min (msr-sie-acci-3))
-                       (extract-hilo FRinti 1 FRintj 1
+                       (extract-hilo FRintieven 1 FRintjeven 1
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjlo
                                                      res
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$" res)
-       (+ pack res op FRinti ope FRintj)
+       ((UNIT MDUALACC) (MACH fr400) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$" res)
+       (+ pack res op FRintieven ope FRintjeven)
        (media-quad-cross-multiply-cross-acc-semantics 1 mode conv addop rhw res
                                                      max min)
-       ((fr400 (unit u-media-2-quad)))
+       ((fr400 (unit u-media-2-quad
+                    (in  FRinti FRintieven)
+                    (in  FRintj FRintjeven))))
   )
 )
 
                cond mode conv addop rhw res max min)
   (if (register-unaligned res 4)
       (c-call VOID "@cpu@_media_acc_not_aligned")
-      (if (orif (register-unaligned FRinti 2)
-               (register-unaligned FRintj 2))
+      (if (orif (register-unaligned FRintieven 2)
+               (register-unaligned FRintjeven 2))
          (c-call VOID "@cpu@_media_register_not_aligned")
          (if cond
              (sequence ((mode argihi) (mode argilo)
                         (mode argjhi) (mode argjlo))
-                       (extract-hilo FRinti 0 FRintj 0
+                       (extract-hilo FRintieven 0 FRintjeven 0
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjlo
                                                      res
                        (media-multiply-acc-semantics conv argilo addop argjhi
                                                      (nextreg rhw res 1)
                                                      max min (msr-sie-acci-1))
-                       (extract-hilo FRinti 1 FRintj 1
+                       (extract-hilo FRintieven 1 FRintjeven 1
                                      argihi argilo argjhi argjlo)
                        (media-multiply-acc-semantics conv argihi addop argjlo
                                                      (nextreg rhw res 2)
                name mode conv addop rhw res max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$" res)
-       (+ pack res op FRinti ope FRintj)
+       ((UNIT MDUALACC) (MACH fr400) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$" res)
+       (+ pack res op FRintieven ope FRintjeven)
        (media-quad-cross-multiply-acc-semantics 1 mode conv addop rhw res
                                                max min)
-       ((fr400 (unit u-media-2-quad)))
+       ((fr400 (unit u-media-2-quad
+                    (in FRinti FRintieven)
+                    (in FRintj FRintjeven))))
   )
 )
 
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
        (+ pack ACC40Sk op FRinti ope FRintj)
        (media-dual-complex-semantics mode conv rhs1 rhs2 max min)
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
        (+ pack ACC40Sk op FRinti ope FRintj)
        (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min)
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
        (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
        (if (eq CCi (or cond 2))
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
        (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
        (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
        (if (eq CCi (or cond 2))
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
-       (+ pack ACC40Sk op FRinti ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+       (+ pack ACC40Sk op FRintieven ope FRintjeven)
        (if (register-unaligned ACC40Sk 2)
           (c-call VOID "@cpu@_media_acc_not_aligned")
-          (if (orif (register-unaligned FRinti 2)
-                    (register-unaligned FRintj 2))
+          (if (orif (register-unaligned FRintieven 2)
+                    (register-unaligned FRintjeven 2))
               (c-call VOID "@cpu@_media_register_not_aligned")
               (sequence ((mode argihi) (mode argilo)
                          (mode argjhi) (mode argjlo))
-                        (extract-hilo FRinti 0 FRintj 0
+                        (extract-hilo FRintieven 0 FRintjeven 0
                                       argihi argilo argjhi argjlo)
                         (media-complex-semantics conv argihi rhs1 argilo rhs2
                                                  ACC40Sk
                                                  max min (msr-sie-acci))
-                        (extract-hilo FRinti 1 FRintj 1
+                        (extract-hilo FRintieven 1 FRintjeven 1
                                       argihi argilo argjhi argjlo)
                         (media-complex-semantics conv argihi rhs1 argilo rhs2
                                                  (nextreg h-acc40S ACC40Sk 1)
                                                  max min (msr-sie-acci-1)))))
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-complex)))
+       ((fr400 (unit u-media-2-quad
+                    (in FRinti FRintieven)
+                    (in FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-complex
+                    (in FRinti FRintieven)
+                    (in FRintj FRintjeven))))
   )
 )
 
                name mode conv rhs1 rhs2 max min op ope comment)
   (dni name
        (comment)
-       ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
-       (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
-       (+ pack ACC40Sk op FRinti ope FRintj)
+       ((UNIT FMALL) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+       (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+       (+ pack ACC40Sk op FRintieven ope FRintjeven)
        (if (register-unaligned ACC40Sk 2)
           (c-call VOID "@cpu@_media_acc_not_aligned")
-          (if (orif (register-unaligned FRinti 2)
-                    (register-unaligned FRintj 2))
+          (if (orif (register-unaligned FRintieven 2)
+                    (register-unaligned FRintjeven 2))
               (c-call VOID "@cpu@_media_register_not_aligned")
               (sequence ((mode argihi) (mode argilo)
                          (mode argjhi) (mode argjlo))
-                        (extract-hilo FRinti 0 FRintj 0
+                        (extract-hilo FRintieven 0 FRintjeven 0
                                       argihi argilo argjhi argjlo)
                         (media-complex-semantics-i conv argihi rhs1 argilo rhs2
                                                  ACC40Sk
                                                  max min (msr-sie-acci))
-                        (extract-hilo FRinti 1 FRintj 1
+                        (extract-hilo FRintieven 1 FRintjeven 1
                                       argihi argilo argjhi argjlo)
                         (media-complex-semantics-i conv argihi rhs1 argilo rhs2
                                                  (nextreg h-acc40S ACC40Sk 1)
                                                  max min (msr-sie-acci-1)))))
-       ((fr400 (unit u-media-2-quad))
-       (fr500 (unit u-media-quad-complex)))
+       ((fr400 (unit u-media-2-quad
+                    (in FRinti FRintieven)
+                    (in FRintj FRintjeven)))
+       (fr500 (unit u-media-quad-complex
+                    (in FRinti FRintieven)
+                    (in FRintj FRintjeven))))
   )
 )
 
 )
 
 (define-pmacro (media-expand-halfword-to-double-semantics cond)
-  (if (register-unaligned FRintk 2)
+  (if (register-unaligned FRintkeven 2)
       (c-call VOID "@cpu@_media_register_not_aligned")
       (if cond
          (sequence ((UHI tmp))
-                   ; a hack to get FRintk referenced for profiling
-                   (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+                   ; a hack to get FRintkeven referenced for profiling
+                   (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
                    (if (and u6 1)
                        (set tmp (halfword lo FRinti 0))
                        (set tmp (halfword hi FRinti 0)))
-                   (set (halfword hi FRintk 0) tmp)
-                   (set (halfword lo FRintk 0) tmp)
-                   (set (halfword hi FRintk 1) tmp)
-                   (set (halfword lo FRintk 1) tmp))))
+                   (set (halfword hi FRintkeven 0) tmp)
+                   (set (halfword lo FRintkeven 0) tmp)
+                   (set (halfword hi FRintkeven 1) tmp)
+                   (set (halfword lo FRintkeven 1) tmp))))
 )
 
 (dni mexpdhd
      "Media expand halfword to double"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
-     "mexpdhd$pack $FRinti,$u6,$FRintk"
-     (+ pack FRintk OP_7B FRinti OPE1_33 u6)
+     "mexpdhd$pack $FRinti,$u6,$FRintkeven"
+     (+ pack FRintkeven OP_7B FRinti OPE1_33 u6)
      (media-expand-halfword-to-double-semantics 1)
-     ((fr400 (unit u-media-dual-expand))
-      (fr500 (unit u-media-dual-expand)))
+     ((fr400 (unit u-media-dual-expand
+                    (out FRintk FRintkeven)))
+      (fr500 (unit u-media-dual-expand
+                    (out FRintk FRintkeven))))
 )
 
 (dni cmexpdhd
      "Conditional media expand halfword to double"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
-     "cmexpdhd$pack $FRinti,$u6,$FRintk,$CCi,$cond"
-     (+ pack FRintk OP_76 FRinti CCi cond OPE4_3 u6)
+     "cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond"
+     (+ pack FRintkeven OP_76 FRinti CCi cond OPE4_3 u6)
      (media-expand-halfword-to-double-semantics (eq CCi (or cond 2)))
-     ((fr400 (unit u-media-dual-expand))
-      (fr500 (unit u-media-dual-expand)))
+     ((fr400 (unit u-media-dual-expand
+                  (out FRintk FRintkeven)))
+      (fr500 (unit u-media-dual-expand
+                  (out FRintk FRintkeven))))
 )
 
 (dni mpackh
 (dni mdpackh
      "Media dual pack"
      ((UNIT FM01) (FR500-MAJOR M-5) (FR400-MAJOR M-2))
-     "mdpackh$pack $FRinti,$FRintj,$FRintk"
-     (+ pack FRintk OP_7B FRinti OPE1_36 FRintj)
-     (if (orif (register-unaligned FRinti 2)
-              (orif (register-unaligned FRintj 2)
-                    (register-unaligned FRintk 2)))
+     "mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven"
+     (+ pack FRintkeven OP_7B FRintieven OPE1_36 FRintjeven)
+     (if (orif (register-unaligned FRintieven 2)
+              (orif (register-unaligned FRintjeven 2)
+                    (register-unaligned FRintkeven 2)))
         (c-call VOID "@cpu@_media_register_not_aligned")
         (sequence ()
                   ; hack to get these referenced for profiling
-                  (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
-                  (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
-                  (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
-                  (media-pack FRinti FRintj FRintk 0)
-                  (media-pack FRinti FRintj FRintk 1)))
-     ((fr400 (unit u-media-3-quad))
-      (fr500 (unit u-media-quad-arith)))
+                  (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven))
+                  (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
+                  (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+                  (media-pack FRintieven FRintjeven FRintkeven 0)
+                  (media-pack FRintieven FRintjeven FRintkeven 1)))
+     ((fr400 (unit u-media-3-quad
+                  (in  FRinti FRintieven)
+                  (in  FRintj FRintjeven)
+                  (out FRintk FRintkeven)))
+      (fr500 (unit u-media-quad-arith
+                  (in  FRinti FRintieven)
+                  (in  FRintj FRintjeven)
+                  (out FRintk FRintkeven))))
 )
 
 (define-pmacro (media-unpack src soff targ toff)
 (dni munpackh
      "Media halfword unpack"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
-     "munpackh$pack $FRinti,$FRintk"
-     (+ pack FRintk OP_7B FRinti OPE1_35 (FRj-null))
-     (if (register-unaligned FRintk 2)
+     "munpackh$pack $FRinti,$FRintkeven"
+     (+ pack FRintkeven OP_7B FRinti OPE1_35 (FRj-null))
+     (if (register-unaligned FRintkeven 2)
         (c-call VOID "@cpu@_media_register_not_aligned")
         (sequence ()
                   ; hack to get these referenced for profiling
                   (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
-                  (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
-                  (media-unpack FRinti 0 FRintk 0)))
-     ((fr400 (unit u-media-dual-expand))
-      (fr500 (unit u-media-dual-expand)))
+                  (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+                  (media-unpack FRinti 0 FRintkeven 0)))
+     ((fr400 (unit u-media-dual-expand
+                  (out FRintk FRintkeven)))
+      (fr500 (unit u-media-dual-expand
+                  (out FRintk FRintkeven))))
 )
 
 (dni mdunpackh
      "Media dual unpack"
      ((UNIT FM01) (FR500-MAJOR M-7) (MACH simple,tomcat,frv))
-     "mdunpackh$pack $FRinti,$FRintk"
-     (+ pack FRintk OP_7B FRinti OPE1_37 (FRj-null))
-     (if (orif (register-unaligned FRinti 2) (register-unaligned FRintk 4))
+     "mdunpackh$pack $FRintieven,$FRintk"
+     (+ pack FRintk OP_7B FRintieven OPE1_37 (FRj-null))
+     (if (orif (register-unaligned FRintieven 2) (register-unaligned FRintk 4))
         (c-call VOID "@cpu@_media_register_not_aligned")
         (sequence ()
                   ; hack to get these referenced for profiling
-                  (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
+                  (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven))
                   (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
-                  (media-unpack FRinti 0 FRintk 0)
-                  (media-unpack FRinti 1 FRintk 2)))
-     ((fr500 (unit u-media-dual-unpack)))
+                  (media-unpack FRintieven 0 FRintk 0)
+                  (media-unpack FRintieven 1 FRintk 2)))
+     ((fr500 (unit u-media-dual-unpack
+                  (in FRinti FRintieven))))
 )
 
 (define-pmacro (ubyte num arg offset)
   (reg (.sym h-fr_ num) (add (index-of arg) offset)))
 
 (define-pmacro (mbtoh-semantics cond)
-  (if (register-unaligned FRintk 2)
+  (if (register-unaligned FRintkeven 2)
       (c-call VOID "@cpu@_media_register_not_aligned")
       (if cond
          (sequence ()
-                   (set (halfword hi FRintk 0) (ubyte 3 FRintj 0))
-                   (set (halfword lo FRintk 0) (ubyte 2 FRintj 0))
-                   (set (halfword hi FRintk 1) (ubyte 1 FRintj 0))
-                   (set (halfword lo FRintk 1) (ubyte 0 FRintj 0)))))
+                   (set (halfword hi FRintkeven 0) (ubyte 3 FRintj 0))
+                   (set (halfword lo FRintkeven 0) (ubyte 2 FRintj 0))
+                   (set (halfword hi FRintkeven 1) (ubyte 1 FRintj 0))
+                   (set (halfword lo FRintkeven 1) (ubyte 0 FRintj 0)))))
 )
 
 (dni mbtoh
      "Media convert byte to halfword"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
-     "mbtoh$pack $FRintj,$FRintk"
-     (+ pack FRintk OP_7B (FRi-null) OPE1_38 FRintj)
+     "mbtoh$pack $FRintj,$FRintkeven"
+     (+ pack FRintkeven OP_7B (FRi-null) OPE1_38 FRintj)
      (sequence ()
               ; hack to get these referenced for profiling
               (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
-              (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+              (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
               (mbtoh-semantics 1))
-     ((fr400 (unit u-media-dual-expand))
-      (fr500 (unit u-media-dual-btoh)))
+     ((fr400 (unit u-media-dual-expand
+                  (out FRintk FRintkeven)))
+      (fr500 (unit u-media-dual-btoh
+                  (out FRintk FRintkeven))))
 )
 
 (dni cmbtoh
      "Conditional media convert byte to halfword"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
-     "cmbtoh$pack $FRintj,$FRintk,$CCi,$cond"
-     (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_0 FRintj)
-     (mbtoh-semantics (eq CCi (or cond 2)))
-     ((fr400 (unit u-media-dual-expand))
-      (fr500 (unit u-media-dual-btoh)))
+     "cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond"
+     (+ pack FRintkeven OP_77 (FRi-null) CCi cond OPE4_0 FRintj)
+     (sequence ()
+              ; hack to get these referenced for profiling
+              (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+              (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+              (mbtoh-semantics (eq CCi (or cond 2))))
+     ((fr400 (unit u-media-dual-expand
+                  (out FRintk FRintkeven)))
+      (fr500 (unit u-media-dual-btoh
+                  (out FRintk FRintkeven))))
 )
 
 (define-pmacro (mhtob-semantics cond)
-  (if (register-unaligned FRintj 2)
+  (if (register-unaligned FRintjeven 2)
       (c-call VOID "@cpu@_media_register_not_aligned")
       (if cond
          (sequence ()
-                   (set (ubyte 3 FRintk 0) (halfword hi FRintj 0))
-                   (set (ubyte 2 FRintk 0) (halfword lo FRintj 0))
-                   (set (ubyte 1 FRintk 0) (halfword hi FRintj 1))
-                   (set (ubyte 0 FRintk 0) (halfword lo FRintj 1)))))
+                   (set (ubyte 3 FRintk 0) (halfword hi FRintjeven 0))
+                   (set (ubyte 2 FRintk 0) (halfword lo FRintjeven 0))
+                   (set (ubyte 1 FRintk 0) (halfword hi FRintjeven 1))
+                   (set (ubyte 0 FRintk 0) (halfword lo FRintjeven 1)))))
 )
 
 (dni mhtob
      "Media convert halfword to byte"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
-     "mhtob$pack $FRintj,$FRintk"
-     (+ pack FRintk OP_7B (FRi-null) OPE1_39 FRintj)
+     "mhtob$pack $FRintjeven,$FRintk"
+     (+ pack FRintk OP_7B (FRi-null) OPE1_39 FRintjeven)
      (sequence ()
               ; hack to get these referenced for profiling
-              (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+              (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
               (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
               (mhtob-semantics 1))
-     ((fr400 (unit u-media-dual-htob))
-      (fr500 (unit u-media-dual-htob)))
+     ((fr400 (unit u-media-dual-htob
+                  (in FRintj FRintjeven)))
+      (fr500 (unit u-media-dual-htob
+                  (in FRintj FRintjeven))))
 )
 
 (dni cmhtob
      "Conditional media convert halfword to byte"
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
-     "cmhtob$pack $FRintj,$FRintk,$CCi,$cond"
-     (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_1 FRintj)
+     "cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond"
+     (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_1 FRintjeven)
      (sequence ()
               ; hack to get these referenced for profiling
-              (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+              (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
               (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
               (mhtob-semantics (eq CCi (or cond 2))))
-     ((fr400 (unit u-media-dual-htob))
-      (fr500 (unit u-media-dual-htob)))
+     ((fr400 (unit u-media-dual-htob
+                  (in FRintj FRintjeven)))
+      (fr500 (unit u-media-dual-htob
+                  (in FRintj FRintjeven))))
 )
 
 (define-pmacro (mbtohe-semantics cond)
      ((fr500 (unit u-media-dual-btohe)))
 )
 
-(dni mclracc
+; Media NOP
+; A special case of mclracc
+(dni mnop "Media nop"
+     ((UNIT FMALL) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+     "mnop$pack"
+     (+ pack (f-ACC40Sk 63) OP_7B (f-A 1) (misc-null-10) OPE1_3B (FRj-null))
+     (nop)
+     ()
+)
+
+; mclracc with #A==0
+(dni mclracc-0
      "Media clear accumulator(s)"
-     ((UNIT FM01) (FR500-MAJOR M-3))
-     "mclracc$pack $ACC40Sk,$A"
-     (+ pack ACC40Sk OP_7B A (misc-null-10) OPE1_3B (FRj-null))
-     (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) A)
+     ((UNIT FM01) (FR500-MAJOR M-3) (FR400-MAJOR M-1))
+     "mclracc$pack $ACC40Sk,$A0"
+     (+ pack ACC40Sk OP_7B (f-A 0) (misc-null-10) OPE1_3B (FRj-null))
+     (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) 0)
+     ((fr400 (unit u-media-4))
+      (fr500 (unit u-media)))
+)
+
+; mclracc with #A==1
+(dni mclracc-1
+     "Media clear accumulator(s)"
+     ((UNIT MCLRACC-1) (FR500-MAJOR M-6) (FR400-MAJOR M-2))
+     "mclracc$pack $ACC40Sk,$A1"
+     (+ pack ACC40Sk OP_7B (f-A 1) (misc-null-10) OPE1_3B (FRj-null))
+     (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) 1)
      ((fr400 (unit u-media-4))
       (fr500 (unit u-media)))
 )
 ; On the other hand spending a little time in the decoder is often worth it.
 ;
 (dnmi nop "nop"
-     ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+     ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
      "nop$pack"
      (emit ori pack (GRi 0) (s12 0) (GRk 0))
 )
 ; Floating point NOP
 (dni fnop
      "Floating point nop"
-     ((UNIT FM01) (FR500-MAJOR F-8) (MACH simple,tomcat,fr500,frv))
+     ((UNIT FMALL) (FR500-MAJOR F-8) (MACH simple,tomcat,fr500,frv))
      "fnop$pack"
      (+ pack (rd-null) OP_79 (FRi-null) OPE1_0D (FRj-null))
      (nop)
      ()
 )
 
-; Media NOP
-; A special case of mclracc
-(dnmi mnop "Media nop"
-      (NO-DIS (UNIT FM01) (FR500-MAJOR M-3))
-     "mnop$pack"
-     (emit mclracc pack (ACC40Sk 63) (A 1))
-)
-
 ; A return instruction
 (dnmi ret "return"
       (NO-DIS (UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3))
 )
 
 (dnmi cmp "compare"
-      (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+      (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
       "cmp$pack $GRi,$GRj,$ICCi_1"
       (emit subcc pack GRi GRj (GRk 0) ICCi_1)
 )
 
 (dnmi cmpi "compare immediate"
-      (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+      (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
       "cmpi$pack $GRi,$s10,$ICCi_1"
       (emit subicc pack GRi s10 (GRk 0) ICCi_1)
 )
 
 (dnmi ccmp "conditional compare"
-      (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+      (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
       "ccmp$pack $GRi,$GRj,$CCi,$cond"
       (emit csubcc pack GRi GRj (GRk 0) CCi cond)
 )
 
 (dnmi mov "move"
-      (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+      (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
       "mov$pack $GRi,$GRk"
       (emit ori pack GRi (s12 0) GRk)
 )   
 
 (dnmi cmov "conditional move"
-      (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+      (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
       "cmov$pack $GRi,$GRk,$CCi,$cond"
       (emit cor pack GRi (GRj 0) GRk CCi cond)
 )   
This page took 0.087759 seconds and 4 git commands to generate.