From 8caa9169eb9c4374cdf06c688b4ee1ca73a85a13 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Wed, 3 Sep 2003 23:03:45 +0000 Subject: [PATCH] 2003-09-03 Dave Brolley * frv.opc (parse_A, parse_A0, parse_A1): New parse handlers. * frv.cpu (UNIT): Add IALL, FMALL, FMLOW, STORE, SCAN, DCPL, MDUALACC, MCLRACC-1. (A): Removed operand. (A0,A1): New operands replace operand A. (mnop): Now a real insn (mclracc): Removed insn. (mclracc-0, mclracc-1): New insns replace mclracc. (all insns): Use new UNIT attributes. --- cpu/ChangeLog | 12 ++ cpu/frv.cpu | 355 ++++++++++++++++++++++++++++---------------------- cpu/frv.opc | 86 ++++++++++-- 3 files changed, 288 insertions(+), 165 deletions(-) diff --git a/cpu/ChangeLog b/cpu/ChangeLog index 14e529943d4..e95c3e42181 100644 --- a/cpu/ChangeLog +++ b/cpu/ChangeLog @@ -1,3 +1,15 @@ +2003-09-03 Dave Brolley + + * frv.opc (parse_A, parse_A0, parse_A1): New parse handlers. + * frv.cpu (UNIT): Add IALL, FMALL, FMLOW, STORE, SCAN, DCPL, MDUALACC, + MCLRACC-1. + (A): Removed operand. + (A0,A1): New operands replace operand A. + (mnop): Now a real insn + (mclracc): Removed insn. + (mclracc-0, mclracc-1): New insns replace mclracc. + (all insns): Use new UNIT attributes. + 2003-08-21 Nick Clifton * frv.cpu (mbtoh): Replace input parameter to u-media-dual-expand diff --git a/cpu/frv.cpu b/cpu/frv.cpu index 86eb06716fc..a97e7be86c4 100644 --- a/cpu/frv.cpu +++ b/cpu/frv.cpu @@ -931,15 +931,23 @@ (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 ) ) @@ -2221,12 +2229,31 @@ (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") @@ -2447,15 +2474,15 @@ (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)) @@ -2472,7 +2499,7 @@ (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)) @@ -2554,7 +2581,7 @@ (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))) @@ -2576,7 +2603,7 @@ (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) @@ -2589,7 +2616,7 @@ (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)) @@ -2607,7 +2634,7 @@ (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)) @@ -2658,7 +2685,7 @@ (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)) @@ -2674,7 +2701,7 @@ (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)) @@ -2701,7 +2728,7 @@ (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) @@ -2723,7 +2750,7 @@ (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) @@ -2750,7 +2777,7 @@ (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) @@ -2794,7 +2821,7 @@ (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)) @@ -2823,7 +2850,7 @@ (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)) @@ -2841,7 +2868,7 @@ (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)) @@ -2861,7 +2888,7 @@ (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))) @@ -2876,7 +2903,7 @@ (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)) @@ -2900,7 +2927,7 @@ (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)) @@ -2987,7 +3014,7 @@ (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))) @@ -3002,7 +3029,7 @@ (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) @@ -3015,7 +3042,7 @@ (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)) @@ -3039,7 +3066,7 @@ (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)) @@ -3073,7 +3100,7 @@ (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)) @@ -3096,7 +3123,7 @@ (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))) @@ -3111,7 +3138,7 @@ (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)) @@ -3134,7 +3161,7 @@ (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)) @@ -3148,7 +3175,7 @@ (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)) @@ -3168,7 +3195,7 @@ ; (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) @@ -3178,7 +3205,7 @@ (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) @@ -3188,7 +3215,7 @@ (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) @@ -3816,7 +3843,7 @@ (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) @@ -3850,7 +3877,7 @@ (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)) @@ -3889,7 +3916,7 @@ (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)) @@ -3912,7 +3939,7 @@ 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)) @@ -3940,7 +3967,7 @@ (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)) @@ -3960,7 +3987,7 @@ (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)) @@ -3979,7 +4006,7 @@ (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)) @@ -4018,7 +4045,7 @@ 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)) @@ -4040,7 +4067,7 @@ (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)) @@ -4221,7 +4248,7 @@ (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)) @@ -4255,7 +4282,7 @@ 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)) @@ -4274,7 +4301,7 @@ (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)) @@ -4287,7 +4314,7 @@ 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)) @@ -4324,7 +4351,7 @@ 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)) @@ -4346,7 +4373,7 @@ (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) @@ -4378,7 +4405,7 @@ (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)) @@ -4397,7 +4424,7 @@ (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)) @@ -5638,10 +5665,10 @@ (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 op ope profile comment) (dni name (comment) - ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2)) + ((UNIT pipe) (FR500-MAJOR C-2) (FR400-MAJOR C-2)) (.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) @@ -5649,10 +5676,10 @@ ) ) -(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") @@ -5775,7 +5802,7 @@ name op ope conv mode src targ attr comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv) attr) + ((UNIT FMALL) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv) attr) (.str name "$pack $" src ",$" targ) (+ pack targ op (rs-null) ope src) (set targ (conv mode src)) @@ -5792,7 +5819,7 @@ 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 () @@ -5810,7 +5837,7 @@ 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 () @@ -5830,7 +5857,7 @@ 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)) @@ -5846,7 +5873,7 @@ 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 () @@ -5873,7 +5900,7 @@ (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 () @@ -5892,7 +5919,7 @@ (define-pmacro (floating-point-neg name src targ op ope attr comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR F-1) attr) + ((UNIT FMALL) (FR500-MAJOR F-1) attr) (.str name "$pack $" src ",$" targ) (+ pack src op (rs-null) ope targ) (set targ (neg src)) @@ -5905,7 +5932,7 @@ (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 () @@ -5916,7 +5943,7 @@ (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)) @@ -5927,7 +5954,7 @@ (define-pmacro (float-abs name src targ op ope attr comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR F-1) attr) + ((UNIT FMALL) (FR500-MAJOR F-1) attr) (.str name "$pack $" src ",$" targ ) (+ pack targ op (rs-null) ope src) (set targ (abs src)) @@ -5940,7 +5967,7 @@ (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 () @@ -5951,7 +5978,7 @@ (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)) @@ -6022,10 +6049,10 @@ ((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 operation op ope major comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) + ((UNIT pipe) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) (.str name "$pack $FRi,$FRj,$FRk") (+ pack FRk op FRi ope FRj) (set FRk (operation FRi FRj)) @@ -6033,9 +6060,9 @@ ) ) -(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 add OP_79 OPE1_06 F-2 "add single float") +(float-binary-op-s fsubs FMALL sub OP_79 OPE1_07 F-2 "sub single float") +(float-binary-op-s fmuls FM01 mul OP_79 OPE1_08 F-3 "mul single float") (dni fdivs "div single float" @@ -6049,7 +6076,7 @@ (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)) @@ -6062,10 +6089,10 @@ (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 operation op ope major comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) + ((UNIT pipe) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond") (+ pack FRk op FRi CCi cond ope FRj) (if (eq CCi (or cond 2)) @@ -6074,15 +6101,15 @@ ) ) -(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 add OP_6D OPE4_0 F-2 "cond add single") +(conditional-float-binary-op cfsubs FMALL sub OP_6D OPE4_1 F-2 "cond sub single") +(conditional-float-binary-op cfmuls FM01 mul OP_6E OPE4_0 F-3 "cond mul single") +(conditional-float-binary-op cfdivs FM01 div OP_6E OPE4_1 F-4 "cond div single") -(define-pmacro (ne-float-binary-op name operation op ope major comment) +(define-pmacro (ne-float-binary-op name pipe operation op ope major comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) + ((UNIT pipe) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv)) (.str name "$pack $FRi,$FRj,$FRk") (+ pack FRk op FRi ope FRj) (sequence () @@ -6092,10 +6119,10 @@ ) ) -(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 add OP_79 OPE1_26 F-2 "ne add single") +(ne-float-binary-op nfsubs FMALL sub OP_79 OPE1_27 F-2 "ne sub single") +(ne-float-binary-op nfmuls FM01 mul OP_79 OPE1_28 F-3 "ne mul single") +(ne-float-binary-op nfdivs FM01 div OP_79 OPE1_29 F-4 "ne div single") (define-pmacro (fcc-eq) 8) (define-pmacro (fcc-lt) 4) @@ -6114,7 +6141,7 @@ (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) @@ -6123,7 +6150,7 @@ (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) @@ -6132,7 +6159,7 @@ (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)) @@ -6142,7 +6169,7 @@ (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 () @@ -6155,7 +6182,7 @@ (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)) @@ -6171,7 +6198,7 @@ (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 () @@ -6185,7 +6212,7 @@ (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 () @@ -6203,7 +6230,7 @@ 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)) @@ -6218,7 +6245,7 @@ (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 () @@ -6455,7 +6482,7 @@ (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) @@ -6464,7 +6491,7 @@ (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) @@ -6473,7 +6500,7 @@ (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 () @@ -6495,7 +6522,7 @@ (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) @@ -6508,7 +6535,7 @@ (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 () @@ -6522,7 +6549,7 @@ (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)) @@ -6538,7 +6565,7 @@ (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)) @@ -6554,7 +6581,7 @@ (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)) @@ -6564,7 +6591,7 @@ (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)) @@ -6641,7 +6668,7 @@ (dni mdcutssi "Media dual cut with signed saturation" - ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2)) + ((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) @@ -6669,7 +6696,7 @@ (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)) @@ -6708,7 +6735,7 @@ (define-pmacro (media-dual-word-rotate-r-r name operation op ope comment) (dni name (comment) - ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-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) @@ -6729,7 +6756,7 @@ (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)) @@ -6749,7 +6776,7 @@ (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)) @@ -6775,7 +6802,7 @@ (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)) @@ -6788,7 +6815,7 @@ (dni mqsaths "Media quad saturation signed" - ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1)) + ((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) @@ -6818,7 +6845,7 @@ (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)) @@ -6832,7 +6859,7 @@ (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) @@ -6876,7 +6903,7 @@ (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)) @@ -6912,7 +6939,7 @@ (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) @@ -6931,7 +6958,7 @@ 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)) @@ -6977,7 +7004,7 @@ (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)) + ((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) @@ -7002,7 +7029,7 @@ name operation mode max min op ope comment) (dni name (comment) - ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-2) CONDITIONAL) + ((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)) @@ -7027,7 +7054,7 @@ (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) @@ -7048,7 +7075,7 @@ 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) @@ -7077,7 +7104,7 @@ (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) @@ -7103,7 +7130,7 @@ (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) @@ -7162,7 +7189,7 @@ (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) @@ -7181,7 +7208,7 @@ 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) @@ -7219,7 +7246,7 @@ (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) + ((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) @@ -7242,7 +7269,7 @@ 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 $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond") (+ pack ACC40Sk op FRintieven CCi cond ope FRintjeven) @@ -7286,7 +7313,7 @@ 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) @@ -7319,7 +7346,7 @@ 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)) @@ -7372,7 +7399,7 @@ name mode conv addop rhw res max min 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)) (.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) @@ -7399,7 +7426,7 @@ 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) + ((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)) @@ -7456,7 +7483,7 @@ name mode conv addop rhw res max min op ope comment) (dni name (comment) - ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2)) + ((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 @@ -7505,7 +7532,7 @@ name mode conv addop rhw res max min op ope comment) (dni name (comment) - ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2)) + ((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 @@ -7554,7 +7581,7 @@ name mode conv addop rhw res max min op ope comment) (dni name (comment) - ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2)) + ((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 @@ -7619,7 +7646,7 @@ 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) @@ -7666,7 +7693,7 @@ 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)) @@ -7733,7 +7760,7 @@ name mode conv rhs1 rhs2 max min 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)) (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk") (+ pack ACC40Sk op FRintieven ope FRintjeven) (if (register-unaligned ACC40Sk 2) @@ -8067,12 +8094,34 @@ ((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) (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 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 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))) ) @@ -8138,7 +8187,7 @@ ; 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)) ) @@ -8146,21 +8195,13 @@ ; 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)) @@ -8169,31 +8210,31 @@ ) (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) ) diff --git a/cpu/frv.opc b/cpu/frv.opc index fb9434e3460..cd3572f0bdf 100644 --- a/cpu/frv.opc +++ b/cpu/frv.opc @@ -185,7 +185,7 @@ frv_is_media_insn (const CGEN_INSN *insn) /* This table represents the allowable packing for vliw insns for the fr400. The fr400 has only 2 vliw slots. Represent this by not allowing any insns - in slots 2 and 3. + in the extra slots. Subsets of any given row are also allowed. */ static VLIW_COMBO fr400_allowed_vliw[] = { @@ -228,15 +228,23 @@ static CGEN_ATTR_VALUE_TYPE fr400_unit_mapping[] = /* I0 */ UNIT_I0, /* I1 */ UNIT_I1, /* I01 */ UNIT_I01, +/* IALL */ UNIT_I01, /* only I0 and I1 units */ /* FM0 */ UNIT_FM0, /* FM1 */ UNIT_FM1, /* FM01 */ UNIT_FM01, +/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */ +/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */ /* B0 */ UNIT_B0, /* branches only in B0 unit. */ /* B1 */ UNIT_B0, /* B01 */ UNIT_B0, /* C */ UNIT_C, -/* MULT-DIV */ UNIT_I0, /* multiply and divide only in I0 unit. */ -/* LOAD */ UNIT_I0 /* load only in I0 unit. */ +/* MULT-DIV */ UNIT_I0, /* multiply and divide only in I0 unit. */ +/* LOAD */ UNIT_I0, /* load only in I0 unit. */ +/* STORE */ UNIT_I0, /* store only in I0 unit. */ +/* SCAN */ UNIT_I0, /* scan only in I0 unit. */ +/* DCPL */ UNIT_C, /* dcpl only in C unit. */ +/* MDUALACC */ UNIT_FM0, /* media dual acc insn only in FM0 unit. */ +/* MCLRACC-1*/ UNIT_FM0 /* mclracc,A==1 insn only in FM0 unit. */ }; static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] = @@ -246,15 +254,23 @@ static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] = /* I0 */ UNIT_I0, /* I1 */ UNIT_I1, /* I01 */ UNIT_I01, +/* IALL */ UNIT_I01, /* only I0 and I1 units */ /* FM0 */ UNIT_FM0, /* FM1 */ UNIT_FM1, /* FM01 */ UNIT_FM01, +/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */ +/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */ /* B0 */ UNIT_B0, /* B1 */ UNIT_B1, /* B01 */ UNIT_B01, /* C */ UNIT_C, /* MULT-DIV */ UNIT_I01, /* multiply and divide in I0 or I1 unit. */ -/* LOAD */ UNIT_I01 /* load in I0 or I1 unit. */ +/* LOAD */ UNIT_I01, /* load in I0 or I1 unit. */ +/* STORE */ UNIT_I0, /* store only in I0 unit. */ +/* SCAN */ UNIT_I01, /* scan in I0 or I1 unit. */ +/* DCPL */ UNIT_C, /* dcpl only in C unit. */ +/* MDUALACC */ UNIT_FM0, /* media dual acc insn only in FM0 unit. */ +/* MCLRACC-1*/ UNIT_FM01 /* mclracc,A==1 in FM0 or FM1 unit. */ }; void @@ -537,10 +553,15 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn) if (unit == UNIT_NIL) abort (); /* no UNIT specified for this insn in frv.cpu */ - if (vliw->mach == bfd_mach_fr400) - major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR); - else - major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR); + switch (vliw->mach) + { + case bfd_mach_fr400: + major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR); + break; + default: + major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR); + break; + } if (index <= 0) { @@ -606,6 +627,12 @@ static const char * parse_u12 PARAMS ((CGEN_CPU_DESC, const char **, int, long *)); static const char * parse_even_register PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *)); +static const char * parse_A0 + PARAMS ((CGEN_CPU_DESC, const char **, int, long *)); +static const char * parse_A1 + PARAMS ((CGEN_CPU_DESC, const char **, int, long *)); +static const char * parse_A + PARAMS ((CGEN_CPU_DESC, const char **, int, long *, long)); static const char * parse_ulo16 (cd, strp, opindex, valuep) @@ -888,6 +915,49 @@ parse_u12 (cd, strp, opindex, valuep) } } +static const char * +parse_A (cd, strp, opindex, valuep, A) + CGEN_CPU_DESC cd; + const char **strp; + int opindex; + long *valuep; + long A; +{ + const char *errmsg; + + if (**strp == '#') + ++*strp; + + errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, valuep); + if (errmsg) + return errmsg; + + if (*valuep != A) + return "Value of A operand must be 0 or 1"; + + return NULL; +} + +static const char * +parse_A0 (cd, strp, opindex, valuep) + CGEN_CPU_DESC cd; + const char **strp; + int opindex; + long *valuep; +{ + return parse_A (cd, strp, opindex, valuep, 0); +} + +static const char * +parse_A1 (cd, strp, opindex, valuep) + CGEN_CPU_DESC cd; + const char **strp; + int opindex; + long *valuep; +{ + return parse_A (cd, strp, opindex, valuep, 1); +} + static const char * parse_even_register (cd, strP, tableP, valueP) CGEN_CPU_DESC cd; -- 2.30.2