; IQ10-only CPU description. -*- Scheme -*-;; Copyright 2001, 2002, 2007, 2009 Free Software Foundation, Inc.;; Contributed by Red Hat Inc; developed under contract from Vitesse.;; This file is part of the GNU Binutils.;; This program is free software; you can redistribute it and/or modify; it under the terms of the GNU General Public License as published by; the Free Software Foundation; either version 3 of the License, or; (at your option) any later version.;; This program is distributed in the hope that it will be useful,; but WITHOUT ANY WARRANTY; without even the implied warranty of; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the; GNU General Public License for more details.;; You should have received a copy of the GNU General Public License; along with this program; if not, write to the Free Software; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,; MA 02110-1301, USA. ; Instructions. (dni andoui-q10 "iq10 and upper ones immediate" (MACH10 USES-RS USES-RT) "andoui $rt,$rs,$hi16" (+ OP10_ANDOUI rs rt hi16) (set rt (and rs (or (sll hi16 16) #xFFFF))) ()) (dni andoui2-q10 "iq10 and upper ones immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT) "andoui ${rt-rs},$hi16" (+ OP10_ANDOUI rt-rs hi16) (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF))) ()) (dni orui-q10 "or upper immediate" (MACH10 USES-RS USES-RT) "orui $rt,$rs,$hi16" (+ OP10_ORUI rs rt hi16) (set rt (or rs (sll hi16 16))) ()) (dni orui2-q10 "or upper immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT) "orui ${rt-rs},$hi16" (+ OP10_ORUI rt-rs hi16) (set rt-rs (or rt-rs (sll hi16 16))) ()) (dni mrgbq10 "merge bytes" (MACH10 USES-RD USES-RS USES-RT) "mrgb $rd,$rs,$rt,$maskq10" (+ OP_SPECIAL rs rt rd maskq10 FUNC_MRGB) (sequence ((SI temp)) (if (bitclear? mask 0) (set temp (and rs #xFF)) (set temp (and rt #xFF))) (if (bitclear? mask 1) (set temp (or temp (and rs #xFF00))) (set temp (or temp (and rt #xFF00)))) (if (bitclear? mask 2) (set temp (or temp (and rs #xFF0000))) (set temp (or temp (and rt #xFF0000)))) (if (bitclear? mask 3) (set temp (or temp (and rs #xFF000000))) (set temp (or temp (and rt #xFF000000)))) (set rd temp)) ()) (dni mrgbq102 "merge bytes" (ALIAS NO-DIS MACH10 USES-RD USES-RS USES-RT) "mrgb ${rd-rs},$rt,$maskq10" (+ OP_SPECIAL rt rd-rs maskq10 FUNC_MRGB) (sequence ((SI temp)) (if (bitclear? mask 0) (set temp (and rd-rs #xFF)) (set temp (and rt #xFF))) (if (bitclear? mask 1) (set temp (or temp (and rd-rs #xFF00))) (set temp (or temp (and rt #xFF00)))) (if (bitclear? mask 2) (set temp (or temp (and rd-rs #xFF0000))) (set temp (or temp (and rt #xFF0000)))) (if (bitclear? mask 3) (set temp (or temp (and rd-rs #xFF000000))) (set temp (or temp (and rt #xFF000000)))) (set rd-rs temp)) ()) ; In the future, we'll want the j & jal to use the 21 bit target, with ; the upper five bits shifted up. For now, give 'em the 16 bit target. (dni jq10 "jump" (MACH10) "j $jmptarg" (+ OP_J (f-rs 0) (f-rt 0) jmptarg); "j $jmptargq10"; (+ OP_J upper-5-jmptargq10 (f-rt 0) lower-16-jmptargq10) (delay 1 (set pc jmptarg)) ()) (dni jalq10 "jump and link" (MACH10 USES-RT) "jal $rt,$jmptarg" (+ OP_JAL (f-rs 0) rt jmptarg); "jal $rt,$jmptargq10"; (+ OP_JAL upper-5-jmptargq10 rt lower-16-jmptargq10) (delay 1 (sequence () (set rt (add pc 8)) (set pc jmptarg))) ()) (dni jalq10-2 "jump and link, implied r31" (MACH10 USES-RT) "jal $jmptarg" (+ OP_JAL (f-rs 0) (f-rt 31) jmptarg) (delay 1 (sequence () (set rt (add pc 8)) (set pc jmptarg))) ()); Branch instructions. (dni bbil "branch bit immediate likely" (MACH10 USES-RS) "bbil $rs($bitnum),$offset" (+ OP10_BBIL rs bitnum offset) (if (bitset? rs bitnum) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbinl "branch bit immediate negated likely" (MACH10 USES-RS) "bbinl $rs($bitnum),$offset" (+ OP10_BBINL rs bitnum offset) (if (bitclear? rs bitnum) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbvl "branch bit variable likely" (MACH10 USES-RS USES-RT) "bbvl $rs,$rt,$offset" (+ OP10_BBVL rs rt offset) (if (bitset? rs (and rt #x1F)) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbvnl "branch bit variable negated likely" (MACH10 USES-RS USES-RT) "bbvnl $rs,$rt,$offset" (+ OP10_BBVNL rs rt offset) (if (bitclear? rs (and rt #x1F)) (delay 1 (set pc offset)) (skip 1)) ()) (dni bgtzal "branch if greater than zero and link" (MACH10 USES-RS USES-R31) "bgtzal $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZAL offset) (if (gt rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset)))) ()) (dni bgtzall "branch if greater than zero and link likely" (MACH10 USES-RS USES-R31) "bgtzall $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZALL offset) (if (gt rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset))) (skip 1)) ()) (dni blezal "branch if less than or equal to zero and link" (MACH10 USES-RS USES-R31) "blezal $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZAL offset) (if (le rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset)))) ()) (dni blezall "branch if less than or equal to zero and link likely" (MACH10 USES-RS USES-R31) "blezall $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZALL offset) (if (le rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset))) (skip 1)) ()) (dni bgtz-q10 "branch if greater than zero" (MACH10 USES-RS) "bgtz $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZ offset) (if (gt rs 0) (delay 1 (set pc offset))) ()) (dni bgtzl-q10 "branch if greater than zero likely" (MACH10 USES-RS) "bgtzl $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZL offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni blez-q10 "branch if less than or equal to zero" (MACH10 USES-RS) "blez $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZ offset) (if (le rs 0) (delay 1 (set pc offset))) ()) (dni blezl-q10 "branch if less than or equal to zero likely" (MACH10 USES-RS) "blezl $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZL offset) (if (le rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni bmb-q10 "branch if matching byte-lane" (MACH10 USES-RS USES-RT) "bmb $rs,$rt,$offset" (+ OP10_BMB rs rt offset) (sequence ((BI branch?)) (set branch? 0) (if (eq (and rs #xFF) (and rt #xFF)) (set branch? 1)) (if (eq (and rs #xFF00) (and rt #xFF00)) (set branch? 1)) (if (eq (and rs #xFF0000) (and rt #xFF0000)) (set branch? 1)) (if (eq (and rs #xFF000000) (and rt #xFF000000)) (set branch? 1)) (if branch? (delay 1 (set pc offset)))) ()) (dni bmbl "branch if matching byte-lane likely" (MACH10 USES-RS USES-RT) "bmbl $rs,$rt,$offset" (+ OP10_BMBL rs rt offset) (sequence ((BI branch?)) (set branch? 0) (if (eq (and rs #xFF) (and rt #xFF)) (set branch? 1)) (if (eq (and rs #xFF00) (and rt #xFF00)) (set branch? 1)) (if (eq (and rs #xFF0000) (and rt #xFF0000)) (set branch? 1)) (if (eq (and rs #xFF000000) (and rt #xFF000000)) (set branch? 1)) (if branch? (delay 1 (set pc offset)) (skip 1))) ()) (dni bri "branch if register invalid" (MACH10 USES-RS) "bri $rs,$offset" (+ OP_REGIMM rs FUNC_BRI offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni brv "branch if register invalid" (MACH10 USES-RS) "brv $rs,$offset" (+ OP_REGIMM rs FUNC_BRV offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) ; debug instructions (dni bctx "branch if the current context == instruction[21]" (MACH10 USES-RS) "bctx $rs,$offset" (+ OP_REGIMM rs FUNC_BCTX offset) (delay 1 (set pc offset)) ()) (dni yield "unconditional yield to the other context" (MACH10) "yield" (+ OP_SPECIAL (f-rs 0) (f-rt 0) (f-rd 0) (f-shamt 0) FUNC10_YIELD) (unimp yield) ()) ; Special instructions. (dni crc32 "CRC, 32 bit input" (MACH10 USES-RD USES-RS USES-RT) "crc32 $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32) (unimp crc32) ()) (dni crc32b "CRC, 8 bit input" (MACH10 USES-RD USES-RS USES-RT) "crc32b $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32B) (unimp crc32b) ()) (dni cnt1s "Count ones" (MACH10 USES-RD USES-RS) "cnt1s $rd,$rs" (+ OP_SPECIAL rs rt rd (f-shamt 0) FUNC10_CNT1S) (unimp crcp) ()) ; Special Instructions (dni avail "Mark Header Buffer Available" (MACH10 USES-RD) "avail $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_AVAIL) (unimp avail) ()) (dni free "Mark Header Buffer Free" (MACH10 USES-RS USES-RD) "free $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_FREE) (unimp free) ()) (dni tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD) "tstod $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_TSTOD) (unimp tstod) ()) (dni cmphdr "Get a Complete Header" (MACH10 USES-RD) "cmphdr $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_CMPHDR) (unimp cmphdr) ()) (dni mcid "Allocate a Multicast ID" (MACH10 USES-RD USES-RT) "mcid $rd,$rt" (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_MCID) (unimp mcid) ()) (dni dba "Allocate a Data Buffer Pointer" (MACH10 USES-RD) "dba $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_DBA) (unimp dba) ()) (dni dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RS USES-RT USES-RD) "dbd $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_DBD) (unimp dbd) ()) (dni dpwt "DSTN_PORT Write" (MACH10 USES-RS USES-RD) "dpwt $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_DPWT) (unimp dpwt) ()) ; Architectural and coprocessor instructions. (dni chkhdrq10 "" (MACH10 USES-RS USES-RD) "chkhdr $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_CHKHDR) (unimp chkhdr) ()) ; Coprocessor DMA Instructions (IQ10) (dni rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD) "rba $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBA) (unimp rba) ()) (dni rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD) "rbal $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAL) (unimp rbal) ()) (dni rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD) "rbar $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAR) (unimp rbar) ()) (dni wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD) "wba $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBA) (unimp wba) ()) (dni wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD) "wbau $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAU) (unimp wbau) ()) (dni wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD) "wbac $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAC) (unimp wbac) ()) (dni rbi "Read Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "rbi $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBI bytecount) (unimp rbi) ()) (dni rbil "Read Bytes Immediate and Lock" (MACH10 USES-RD USES-RS USES-RT) "rbil $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBIL bytecount) (unimp rbil) ()) (dni rbir "Read Bytes Immediate and Release" (MACH10 USES-RD USES-RS USES-RT) "rbir $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBIR bytecount) (unimp rbir) ()) (dni wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "wbi $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBI bytecount) (unimp wbi) ()) (dni wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT) "wbic $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBIC bytecount) (unimp wbic) ()) (dni wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "wbiu $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBIU bytecount) (unimp wbiu) ()) (dni pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT) "pkrli $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLI bytecount) (unimp pkrli) ()) (dni pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT) "pkrlih $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIH bytecount) (unimp pkrlih) ()) (dni pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT) "pkrliu $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIU bytecount) (unimp pkrliu) ()) (dni pkrlic "Packet Release Immediate Continue" (MACH10 USES-RD USES-RS USES-RT) "pkrlic $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIC bytecount) (unimp pkrlic) ()) (dni pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD) "pkrla $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLA) (unimp pkrla) ()) (dni pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD) "pkrlau $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAU) (unimp pkrlau) ()) (dni pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD) "pkrlah $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAH) (unimp pkrlah) ()) (dni pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD) "pkrlac $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAC) (unimp pkrlac) ()) ; Main Memory Access Instructions (dni lock "lock memory" (MACH10 USES-RD USES-RT) "lock $rd,$rt" (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_LOCK) (unimp lock) ()) (dni unlk "unlock memory" (MACH10 USES-RT USES-RD) "unlk $rd,$rt"Lines 1–500 of 1112. Load more
; IQ10-only CPU description. -*- Scheme -*- ; ; Copyright 2001, 2002, 2007, 2009 Free Software Foundation, Inc. ; ; Contributed by Red Hat Inc; developed under contract from Vitesse. ; ; This file is part of the GNU Binutils. ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 3 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, ; MA 02110-1301, USA. ; Instructions. (dni andoui-q10 "iq10 and upper ones immediate" (MACH10 USES-RS USES-RT) "andoui $rt,$rs,$hi16" (+ OP10_ANDOUI rs rt hi16) (set rt (and rs (or (sll hi16 16) #xFFFF))) ()) (dni andoui2-q10 "iq10 and upper ones immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT) "andoui ${rt-rs},$hi16" (+ OP10_ANDOUI rt-rs hi16) (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF))) ()) (dni orui-q10 "or upper immediate" (MACH10 USES-RS USES-RT) "orui $rt,$rs,$hi16" (+ OP10_ORUI rs rt hi16) (set rt (or rs (sll hi16 16))) ()) (dni orui2-q10 "or upper immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT) "orui ${rt-rs},$hi16" (+ OP10_ORUI rt-rs hi16) (set rt-rs (or rt-rs (sll hi16 16))) ()) (dni mrgbq10 "merge bytes" (MACH10 USES-RD USES-RS USES-RT) "mrgb $rd,$rs,$rt,$maskq10" (+ OP_SPECIAL rs rt rd maskq10 FUNC_MRGB) (sequence ((SI temp)) (if (bitclear? mask 0) (set temp (and rs #xFF)) (set temp (and rt #xFF))) (if (bitclear? mask 1) (set temp (or temp (and rs #xFF00))) (set temp (or temp (and rt #xFF00)))) (if (bitclear? mask 2) (set temp (or temp (and rs #xFF0000))) (set temp (or temp (and rt #xFF0000)))) (if (bitclear? mask 3) (set temp (or temp (and rs #xFF000000))) (set temp (or temp (and rt #xFF000000)))) (set rd temp)) ()) (dni mrgbq102 "merge bytes" (ALIAS NO-DIS MACH10 USES-RD USES-RS USES-RT) "mrgb ${rd-rs},$rt,$maskq10" (+ OP_SPECIAL rt rd-rs maskq10 FUNC_MRGB) (sequence ((SI temp)) (if (bitclear? mask 0) (set temp (and rd-rs #xFF)) (set temp (and rt #xFF))) (if (bitclear? mask 1) (set temp (or temp (and rd-rs #xFF00))) (set temp (or temp (and rt #xFF00)))) (if (bitclear? mask 2) (set temp (or temp (and rd-rs #xFF0000))) (set temp (or temp (and rt #xFF0000)))) (if (bitclear? mask 3) (set temp (or temp (and rd-rs #xFF000000))) (set temp (or temp (and rt #xFF000000)))) (set rd-rs temp)) ()) ; In the future, we'll want the j & jal to use the 21 bit target, with ; the upper five bits shifted up. For now, give 'em the 16 bit target. (dni jq10 "jump" (MACH10) "j $jmptarg" (+ OP_J (f-rs 0) (f-rt 0) jmptarg) ; "j $jmptargq10" ; (+ OP_J upper-5-jmptargq10 (f-rt 0) lower-16-jmptargq10) (delay 1 (set pc jmptarg)) ()) (dni jalq10 "jump and link" (MACH10 USES-RT) "jal $rt,$jmptarg" (+ OP_JAL (f-rs 0) rt jmptarg) ; "jal $rt,$jmptargq10" ; (+ OP_JAL upper-5-jmptargq10 rt lower-16-jmptargq10) (delay 1 (sequence () (set rt (add pc 8)) (set pc jmptarg))) ()) (dni jalq10-2 "jump and link, implied r31" (MACH10 USES-RT) "jal $jmptarg" (+ OP_JAL (f-rs 0) (f-rt 31) jmptarg) (delay 1 (sequence () (set rt (add pc 8)) (set pc jmptarg))) ()) ; Branch instructions. (dni bbil "branch bit immediate likely" (MACH10 USES-RS) "bbil $rs($bitnum),$offset" (+ OP10_BBIL rs bitnum offset) (if (bitset? rs bitnum) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbinl "branch bit immediate negated likely" (MACH10 USES-RS) "bbinl $rs($bitnum),$offset" (+ OP10_BBINL rs bitnum offset) (if (bitclear? rs bitnum) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbvl "branch bit variable likely" (MACH10 USES-RS USES-RT) "bbvl $rs,$rt,$offset" (+ OP10_BBVL rs rt offset) (if (bitset? rs (and rt #x1F)) (delay 1 (set pc offset)) (skip 1)) ()) (dni bbvnl "branch bit variable negated likely" (MACH10 USES-RS USES-RT) "bbvnl $rs,$rt,$offset" (+ OP10_BBVNL rs rt offset) (if (bitclear? rs (and rt #x1F)) (delay 1 (set pc offset)) (skip 1)) ()) (dni bgtzal "branch if greater than zero and link" (MACH10 USES-RS USES-R31) "bgtzal $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZAL offset) (if (gt rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset)))) ()) (dni bgtzall "branch if greater than zero and link likely" (MACH10 USES-RS USES-R31) "bgtzall $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZALL offset) (if (gt rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset))) (skip 1)) ()) (dni blezal "branch if less than or equal to zero and link" (MACH10 USES-RS USES-R31) "blezal $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZAL offset) (if (le rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset)))) ()) (dni blezall "branch if less than or equal to zero and link likely" (MACH10 USES-RS USES-R31) "blezall $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZALL offset) (if (le rs 0) (sequence () (set (reg h-gr 31) (add pc 8)) (delay 1 (set pc offset))) (skip 1)) ()) (dni bgtz-q10 "branch if greater than zero" (MACH10 USES-RS) "bgtz $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZ offset) (if (gt rs 0) (delay 1 (set pc offset))) ()) (dni bgtzl-q10 "branch if greater than zero likely" (MACH10 USES-RS) "bgtzl $rs,$offset" (+ OP_REGIMM rs FUNC_BGTZL offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni blez-q10 "branch if less than or equal to zero" (MACH10 USES-RS) "blez $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZ offset) (if (le rs 0) (delay 1 (set pc offset))) ()) (dni blezl-q10 "branch if less than or equal to zero likely" (MACH10 USES-RS) "blezl $rs,$offset" (+ OP_REGIMM rs FUNC_BLEZL offset) (if (le rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni bmb-q10 "branch if matching byte-lane" (MACH10 USES-RS USES-RT) "bmb $rs,$rt,$offset" (+ OP10_BMB rs rt offset) (sequence ((BI branch?)) (set branch? 0) (if (eq (and rs #xFF) (and rt #xFF)) (set branch? 1)) (if (eq (and rs #xFF00) (and rt #xFF00)) (set branch? 1)) (if (eq (and rs #xFF0000) (and rt #xFF0000)) (set branch? 1)) (if (eq (and rs #xFF000000) (and rt #xFF000000)) (set branch? 1)) (if branch? (delay 1 (set pc offset)))) ()) (dni bmbl "branch if matching byte-lane likely" (MACH10 USES-RS USES-RT) "bmbl $rs,$rt,$offset" (+ OP10_BMBL rs rt offset) (sequence ((BI branch?)) (set branch? 0) (if (eq (and rs #xFF) (and rt #xFF)) (set branch? 1)) (if (eq (and rs #xFF00) (and rt #xFF00)) (set branch? 1)) (if (eq (and rs #xFF0000) (and rt #xFF0000)) (set branch? 1)) (if (eq (and rs #xFF000000) (and rt #xFF000000)) (set branch? 1)) (if branch? (delay 1 (set pc offset)) (skip 1))) ()) (dni bri "branch if register invalid" (MACH10 USES-RS) "bri $rs,$offset" (+ OP_REGIMM rs FUNC_BRI offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) (dni brv "branch if register invalid" (MACH10 USES-RS) "brv $rs,$offset" (+ OP_REGIMM rs FUNC_BRV offset) (if (gt rs 0) (delay 1 (set pc offset)) (skip 1)) ()) ; debug instructions (dni bctx "branch if the current context == instruction[21]" (MACH10 USES-RS) "bctx $rs,$offset" (+ OP_REGIMM rs FUNC_BCTX offset) (delay 1 (set pc offset)) ()) (dni yield "unconditional yield to the other context" (MACH10) "yield" (+ OP_SPECIAL (f-rs 0) (f-rt 0) (f-rd 0) (f-shamt 0) FUNC10_YIELD) (unimp yield) ()) ; Special instructions. (dni crc32 "CRC, 32 bit input" (MACH10 USES-RD USES-RS USES-RT) "crc32 $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32) (unimp crc32) ()) (dni crc32b "CRC, 8 bit input" (MACH10 USES-RD USES-RS USES-RT) "crc32b $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32B) (unimp crc32b) ()) (dni cnt1s "Count ones" (MACH10 USES-RD USES-RS) "cnt1s $rd,$rs" (+ OP_SPECIAL rs rt rd (f-shamt 0) FUNC10_CNT1S) (unimp crcp) ()) ; Special Instructions (dni avail "Mark Header Buffer Available" (MACH10 USES-RD) "avail $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_AVAIL) (unimp avail) ()) (dni free "Mark Header Buffer Free" (MACH10 USES-RS USES-RD) "free $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_FREE) (unimp free) ()) (dni tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD) "tstod $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_TSTOD) (unimp tstod) ()) (dni cmphdr "Get a Complete Header" (MACH10 USES-RD) "cmphdr $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_CMPHDR) (unimp cmphdr) ()) (dni mcid "Allocate a Multicast ID" (MACH10 USES-RD USES-RT) "mcid $rd,$rt" (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_MCID) (unimp mcid) ()) (dni dba "Allocate a Data Buffer Pointer" (MACH10 USES-RD) "dba $rd" (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_DBA) (unimp dba) ()) (dni dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RS USES-RT USES-RD) "dbd $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_DBD) (unimp dbd) ()) (dni dpwt "DSTN_PORT Write" (MACH10 USES-RS USES-RD) "dpwt $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_DPWT) (unimp dpwt) ()) ; Architectural and coprocessor instructions. (dni chkhdrq10 "" (MACH10 USES-RS USES-RD) "chkhdr $rd,$rs" (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_CHKHDR) (unimp chkhdr) ()) ; Coprocessor DMA Instructions (IQ10) (dni rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD) "rba $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBA) (unimp rba) ()) (dni rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD) "rbal $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAL) (unimp rbal) ()) (dni rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD) "rbar $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAR) (unimp rbar) ()) (dni wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD) "wba $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBA) (unimp wba) ()) (dni wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD) "wbau $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAU) (unimp wbau) ()) (dni wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD) "wbac $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAC) (unimp wbac) ()) (dni rbi "Read Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "rbi $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBI bytecount) (unimp rbi) ()) (dni rbil "Read Bytes Immediate and Lock" (MACH10 USES-RD USES-RS USES-RT) "rbil $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBIL bytecount) (unimp rbil) ()) (dni rbir "Read Bytes Immediate and Release" (MACH10 USES-RD USES-RS USES-RT) "rbir $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_RBIR bytecount) (unimp rbir) ()) (dni wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "wbi $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBI bytecount) (unimp wbi) ()) (dni wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT) "wbic $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBIC bytecount) (unimp wbic) ()) (dni wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT) "wbiu $rd,$rs,$rt,$bytecount" (+ OP_COP3 rs rt rd FUNC10_WBIU bytecount) (unimp wbiu) ()) (dni pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT) "pkrli $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLI bytecount) (unimp pkrli) ()) (dni pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT) "pkrlih $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIH bytecount) (unimp pkrlih) ()) (dni pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT) "pkrliu $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIU bytecount) (unimp pkrliu) ()) (dni pkrlic "Packet Release Immediate Continue" (MACH10 USES-RD USES-RS USES-RT) "pkrlic $rd,$rs,$rt,$bytecount" (+ OP_COP2 rs rt rd FUNC10_PKRLIC bytecount) (unimp pkrlic) ()) (dni pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD) "pkrla $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLA) (unimp pkrla) ()) (dni pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD) "pkrlau $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAU) (unimp pkrlau) ()) (dni pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD) "pkrlah $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAH) (unimp pkrlah) ()) (dni pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD) "pkrlac $rd,$rs,$rt" (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAC) (unimp pkrlac) ()) ; Main Memory Access Instructions (dni lock "lock memory" (MACH10 USES-RD USES-RT) "lock $rd,$rt" (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_LOCK) (unimp lock) ()) (dni unlk "unlock memory" (MACH10 USES-RT USES-RD) "unlk $rd,$rt"