OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [cpu/] [iq2000m.cpu] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
; IQ2000-only CPU description. -*- Scheme -*-
; IQ2000-only CPU description. -*- Scheme -*-
;
;
; Copyright 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
; Copyright 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
;
;
; Contributed by Red Hat Inc; developed under contract from Vitesse.
; Contributed by Red Hat Inc; developed under contract from Vitesse.
;
;
; This file is part of the GNU Binutils.
; This file is part of the GNU Binutils.
;
;
; This program is free software; you can redistribute it and/or modify
; 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
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 3 of the License, or
; the Free Software Foundation; either version 3 of the License, or
; (at your option) any later version.
; (at your option) any later version.
;
;
; This program is distributed in the hope that it will be useful,
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; GNU General Public License for more details.
;
;
; You should have received a copy of the GNU General Public License
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
; MA 02110-1301, USA.
; MA 02110-1301, USA.
(dni andoui "and upper ones immediate" (MACH2000 USES-RS USES-RT)
(dni andoui "and upper ones immediate" (MACH2000 USES-RS USES-RT)
     "andoui $rt,$rs,$hi16"
     "andoui $rt,$rs,$hi16"
     (+ OP_ANDOUI rs rt hi16)
     (+ OP_ANDOUI rs rt hi16)
     (set rt (and rs (or (sll hi16 16) #xFFFF)))
     (set rt (and rs (or (sll hi16 16) #xFFFF)))
     ())
     ())
(dni andoui2 "and upper ones immediate" (ALIAS NO-DIS MACH2000 USES-RS USES-RT)
(dni andoui2 "and upper ones immediate" (ALIAS NO-DIS MACH2000 USES-RS USES-RT)
     "andoui ${rt-rs},$hi16"
     "andoui ${rt-rs},$hi16"
     (+ OP_ANDOUI rt-rs hi16)
     (+ OP_ANDOUI rt-rs hi16)
     (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF)))
     (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF)))
     ())
     ())
(dni orui2 "or upper immediate" (ALIAS NO-DIS MACH2000 USES-RS USES-RT)
(dni orui2 "or upper immediate" (ALIAS NO-DIS MACH2000 USES-RS USES-RT)
     "orui ${rt-rs},$hi16"
     "orui ${rt-rs},$hi16"
     (+ OP_ORUI rt-rs hi16)
     (+ OP_ORUI rt-rs hi16)
     (set rt-rs (or rt-rs (sll hi16 16)))
     (set rt-rs (or rt-rs (sll hi16 16)))
     ())
     ())
(dni orui "or upper immediate" (MACH2000 USES-RS USES-RT)
(dni orui "or upper immediate" (MACH2000 USES-RS USES-RT)
     "orui $rt,$rs,$hi16"
     "orui $rt,$rs,$hi16"
     (+ OP_ORUI rs rt hi16)
     (+ OP_ORUI rs rt hi16)
     (set rt (or rs (sll hi16 16)))
     (set rt (or rs (sll hi16 16)))
     ())
     ())
(dni bgtz "branch if greater than zero" (MACH2000 USES-RS)
(dni bgtz "branch if greater than zero" (MACH2000 USES-RS)
     "bgtz $rs,$offset"
     "bgtz $rs,$offset"
     (+ OP_BGTZ rs (f-rt 0) offset)
     (+ OP_BGTZ rs (f-rt 0) offset)
     (if (gt rs 0)
     (if (gt rs 0)
         (delay 1 (set pc offset)))
         (delay 1 (set pc offset)))
     ())
     ())
(dni bgtzl "branch if greater than zero likely" (MACH2000 USES-RS)
(dni bgtzl "branch if greater than zero likely" (MACH2000 USES-RS)
     "bgtzl $rs,$offset"
     "bgtzl $rs,$offset"
     (+ OP_BGTZL rs (f-rt 0) offset)
     (+ OP_BGTZL rs (f-rt 0) offset)
     (if (gt rs 0)
     (if (gt rs 0)
         (delay 1 (set pc offset))
         (delay 1 (set pc offset))
         (skip 1))
         (skip 1))
     ())
     ())
(dni blez "branch if less than or equal to zero" (MACH2000 USES-RS)
(dni blez "branch if less than or equal to zero" (MACH2000 USES-RS)
     "blez $rs,$offset"
     "blez $rs,$offset"
     (+ OP_BLEZ rs (f-rt 0) offset)
     (+ OP_BLEZ rs (f-rt 0) offset)
     (if (le rs 0)
     (if (le rs 0)
         (delay 1 (set pc offset)))
         (delay 1 (set pc offset)))
     ())
     ())
(dni blezl "branch if less than or equal to zero likely" (MACH2000 USES-RS)
(dni blezl "branch if less than or equal to zero likely" (MACH2000 USES-RS)
     "blezl $rs,$offset"
     "blezl $rs,$offset"
     (+ OP_BLEZL rs (f-rt 0) offset)
     (+ OP_BLEZL rs (f-rt 0) offset)
     (if (le rs 0)
     (if (le rs 0)
         (delay 1 (set pc offset))
         (delay 1 (set pc offset))
         (skip 1))
         (skip 1))
     ())
     ())
(dni mrgb "merge bytes" (MACH2000 USES-RD USES-RS USES-RT)
(dni mrgb "merge bytes" (MACH2000 USES-RD USES-RS USES-RT)
     "mrgb $rd,$rs,$rt,$mask"
     "mrgb $rd,$rs,$rt,$mask"
     (+ OP_SPECIAL rs rt rd (f-10 0) mask FUNC_MRGB)
     (+ OP_SPECIAL rs rt rd (f-10 0) mask FUNC_MRGB)
     (sequence ((SI temp))
     (sequence ((SI temp))
               (if (bitclear? mask 0)
               (if (bitclear? mask 0)
                   (set temp (and rs #xFF))
                   (set temp (and rs #xFF))
                   (set temp (and rt #xFF)))
                   (set temp (and rt #xFF)))
               (if (bitclear? mask 1)
               (if (bitclear? mask 1)
                   (set temp (or temp (and rs #xFF00)))
                   (set temp (or temp (and rs #xFF00)))
                   (set temp (or temp (and rt #xFF00))))
                   (set temp (or temp (and rt #xFF00))))
               (if (bitclear? mask 2)
               (if (bitclear? mask 2)
                   (set temp (or temp (and rs #xFF0000)))
                   (set temp (or temp (and rs #xFF0000)))
                   (set temp (or temp (and rt #xFF0000))))
                   (set temp (or temp (and rt #xFF0000))))
               (if (bitclear? mask 3)
               (if (bitclear? mask 3)
                   (set temp (or temp (and rs #xFF000000)))
                   (set temp (or temp (and rs #xFF000000)))
                   (set temp (or temp (and rt #xFF000000))))
                   (set temp (or temp (and rt #xFF000000))))
               (set rd temp))
               (set rd temp))
     ())
     ())
(dni mrgb2 "merge bytes" (ALIAS NO-DIS MACH2000 USES-RD USES-RS USES-RT)
(dni mrgb2 "merge bytes" (ALIAS NO-DIS MACH2000 USES-RD USES-RS USES-RT)
     "mrgb ${rd-rs},$rt,$mask"
     "mrgb ${rd-rs},$rt,$mask"
     (+ OP_SPECIAL rt rd-rs (f-10 0) mask FUNC_MRGB)
     (+ OP_SPECIAL rt rd-rs (f-10 0) mask FUNC_MRGB)
     (sequence ((SI temp))
     (sequence ((SI temp))
               (if (bitclear? mask 0)
               (if (bitclear? mask 0)
                   (set temp (and rd-rs #xFF))
                   (set temp (and rd-rs #xFF))
                   (set temp (and rt #xFF)))
                   (set temp (and rt #xFF)))
               (if (bitclear? mask 1)
               (if (bitclear? mask 1)
                   (set temp (or temp (and rd-rs #xFF00)))
                   (set temp (or temp (and rd-rs #xFF00)))
                   (set temp (or temp (and rt #xFF00))))
                   (set temp (or temp (and rt #xFF00))))
               (if (bitclear? mask 2)
               (if (bitclear? mask 2)
                   (set temp (or temp (and rd-rs #xFF0000)))
                   (set temp (or temp (and rd-rs #xFF0000)))
                   (set temp (or temp (and rt #xFF0000))))
                   (set temp (or temp (and rt #xFF0000))))
               (if (bitclear? mask 3)
               (if (bitclear? mask 3)
                   (set temp (or temp (and rd-rs #xFF000000)))
                   (set temp (or temp (and rd-rs #xFF000000)))
                   (set temp (or temp (and rt #xFF000000))))
                   (set temp (or temp (and rt #xFF000000))))
               (set rd-rs temp))
               (set rd-rs temp))
     ())
     ())
; NOTE: None of these instructions' semantics are specified, so they
; NOTE: None of these instructions' semantics are specified, so they
; will not work in a simulator.
; will not work in a simulator.
;
;
; Architectural and coprocessor instructions.
; Architectural and coprocessor instructions.
; BREAK and SYSCALL are implemented with escape hatches to the C
; BREAK and SYSCALL are implemented with escape hatches to the C
; code.  These are used by the test suite to indicate pass/failures.
; code.  These are used by the test suite to indicate pass/failures.
(dni bctxt "branch and switch context" (MACH2000 DELAY-SLOT COND-CTI USES-RS)
(dni bctxt "branch and switch context" (MACH2000 DELAY-SLOT COND-CTI USES-RS)
     "bctxt $rs,$offset"
     "bctxt $rs,$offset"
     (+ OP_REGIMM rs (f-rt 6) offset)
     (+ OP_REGIMM rs (f-rt 6) offset)
     (unimp bctxt)
     (unimp bctxt)
     ())
     ())
(dni bc0f "branch if copro 0 condition false" (MACH2000 DELAY-SLOT COND-CTI)
(dni bc0f "branch if copro 0 condition false" (MACH2000 DELAY-SLOT COND-CTI)
     "bc0f $offset"
     "bc0f $offset"
     (+ OP_COP0 (f-rs 8) (f-rt 0) offset)
     (+ OP_COP0 (f-rs 8) (f-rt 0) offset)
     (unimp bc0f)
     (unimp bc0f)
     ())
     ())
(dni bc0fl "branch if copro 0 condition false likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
(dni bc0fl "branch if copro 0 condition false likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
     "bc0fl $offset"
     "bc0fl $offset"
     (+ OP_COP0 (f-rs 8) (f-rt 2) offset)
     (+ OP_COP0 (f-rs 8) (f-rt 2) offset)
     (unimp bc0fl)
     (unimp bc0fl)
     ())
     ())
(dni bc3f "branch if copro 3 condition false" (MACH2000 DELAY-SLOT COND-CTI)
(dni bc3f "branch if copro 3 condition false" (MACH2000 DELAY-SLOT COND-CTI)
     "bc3f $offset"
     "bc3f $offset"
     (+ OP_COP3 (f-rs 8) (f-rt 0) offset)
     (+ OP_COP3 (f-rs 8) (f-rt 0) offset)
     (unimp bc3f)
     (unimp bc3f)
     ())
     ())
(dni bc3fl "branch if copro 3 condition false likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
(dni bc3fl "branch if copro 3 condition false likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
     "bc3fl $offset"
     "bc3fl $offset"
     (+ OP_COP3 (f-rs 8) (f-rt 2) offset)
     (+ OP_COP3 (f-rs 8) (f-rt 2) offset)
     (unimp bc3fl)
     (unimp bc3fl)
     ())
     ())
(dni bc0t "branch if copro 0 condition true" (MACH2000 DELAY-SLOT COND-CTI)
(dni bc0t "branch if copro 0 condition true" (MACH2000 DELAY-SLOT COND-CTI)
     "bc0t $offset"
     "bc0t $offset"
     (+ OP_COP0 (f-rs 8) (f-rt 1) offset)
     (+ OP_COP0 (f-rs 8) (f-rt 1) offset)
     (unimp bc0t)
     (unimp bc0t)
     ())
     ())
(dni bc0tl "branch if copro 0 condition true likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
(dni bc0tl "branch if copro 0 condition true likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
     "bc0tl $offset"
     "bc0tl $offset"
     (+ OP_COP0 (f-rs 8) (f-rt 3) offset)
     (+ OP_COP0 (f-rs 8) (f-rt 3) offset)
     (unimp bc0tl)
     (unimp bc0tl)
     ())
     ())
(dni bc3t "branch if copro 3 condition true" (MACH2000 DELAY-SLOT COND-CTI)
(dni bc3t "branch if copro 3 condition true" (MACH2000 DELAY-SLOT COND-CTI)
     "bc3t $offset"
     "bc3t $offset"
     (+ OP_COP3 (f-rs 8) (f-rt 1) offset)
     (+ OP_COP3 (f-rs 8) (f-rt 1) offset)
     (unimp bc3t)
     (unimp bc3t)
     ())
     ())
(dni bc3tl "branch if copro 3 condition true likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
(dni bc3tl "branch if copro 3 condition true likely" (MACH2000 DELAY-SLOT COND-CTI SKIP-CTI)
     "bc3tl $offset"
     "bc3tl $offset"
     (+ OP_COP3 (f-rs 8) (f-rt 3) offset)
     (+ OP_COP3 (f-rs 8) (f-rt 3) offset)
     (unimp bc3tl)
     (unimp bc3tl)
     ())
     ())
; Note that we don't set the USES-RD or USES-RT attributes for many of the following
; Note that we don't set the USES-RD or USES-RT attributes for many of the following
; instructions, as it's the COP register that's being specified.
; instructions, as it's the COP register that's being specified.
(dni cfc0 "control from coprocessor 0" (MACH2000 LOAD-DELAY USES-RT)
(dni cfc0 "control from coprocessor 0" (MACH2000 LOAD-DELAY USES-RT)
     "cfc0 $rt,$rd"
     "cfc0 $rt,$rd"
     (+ OP_COP0 (f-rs 2) rt rd (f-10-11 0))
     (+ OP_COP0 (f-rs 2) rt rd (f-10-11 0))
     (unimp cfc0)
     (unimp cfc0)
     ())
     ())
(dni cfc1 "control from coprocessor 1" (MACH2000 LOAD-DELAY USES-RT)
(dni cfc1 "control from coprocessor 1" (MACH2000 LOAD-DELAY USES-RT)
     "cfc1 $rt,$rd"
     "cfc1 $rt,$rd"
     (+ OP_COP1 (f-rs 2) rt rd (f-10-11 0))
     (+ OP_COP1 (f-rs 2) rt rd (f-10-11 0))
     (unimp cfc1)
     (unimp cfc1)
     ())
     ())
(dni cfc2 "control from coprocessor 2" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
(dni cfc2 "control from coprocessor 2" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
     "cfc2 $rt,$rd"
     "cfc2 $rt,$rd"
     (+ OP_COP2 (f-rs 2) rt rd (f-10-11 0))
     (+ OP_COP2 (f-rs 2) rt rd (f-10-11 0))
     (unimp cfc2)
     (unimp cfc2)
     ())
     ())
(dni cfc3 "control from coprocessor 3" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
(dni cfc3 "control from coprocessor 3" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
     "cfc3 $rt,$rd"
     "cfc3 $rt,$rd"
     (+ OP_COP3 (f-rs 2) rt rd (f-10-11 0))
     (+ OP_COP3 (f-rs 2) rt rd (f-10-11 0))
     (unimp cfc3)
     (unimp cfc3)
     ())
     ())
; COPz instructions are an instruction form, not real instructions
; COPz instructions are an instruction form, not real instructions
; with associated assembly mnemonics.  Therefore, they are omitted
; with associated assembly mnemonics.  Therefore, they are omitted
; from the ISA description.
; from the ISA description.
(dni chkhdr "check header" (MACH2000 LOAD-DELAY USES-RD YIELD-INSN)
(dni chkhdr "check header" (MACH2000 LOAD-DELAY USES-RD YIELD-INSN)
     "chkhdr $rd,$rt"
     "chkhdr $rd,$rt"
     (+ OP_COP3 (f-rs 9) rt rd (f-shamt 0) (f-func 0))
     (+ OP_COP3 (f-rs 9) rt rd (f-shamt 0) (f-func 0))
     (unimp chkhdr)
     (unimp chkhdr)
     ())
     ())
(dni ctc0 "control to coprocessor 0" (MACH2000 USES-RT)
(dni ctc0 "control to coprocessor 0" (MACH2000 USES-RT)
     "ctc0 $rt,$rd"
     "ctc0 $rt,$rd"
     (+ OP_COP0 (f-rs 6) rt rd (f-10-11 0))
     (+ OP_COP0 (f-rs 6) rt rd (f-10-11 0))
     (unimp ctc0)
     (unimp ctc0)
     ())
     ())
(dni ctc1 "control to coprocessor 1" (MACH2000 USES-RT)
(dni ctc1 "control to coprocessor 1" (MACH2000 USES-RT)
     "ctc1 $rt,$rd"
     "ctc1 $rt,$rd"
     (+ OP_COP1 (f-rs 6) rt rd (f-10-11 0))
     (+ OP_COP1 (f-rs 6) rt rd (f-10-11 0))
     (unimp ctc1)
     (unimp ctc1)
     ())
     ())
(dni ctc2 "control to coprocessor 2" (MACH2000 USES-RT)
(dni ctc2 "control to coprocessor 2" (MACH2000 USES-RT)
     "ctc2 $rt,$rd"
     "ctc2 $rt,$rd"
     (+ OP_COP2 (f-rs 6) rt rd (f-10-11 0))
     (+ OP_COP2 (f-rs 6) rt rd (f-10-11 0))
     (unimp ctc2)
     (unimp ctc2)
     ())
     ())
(dni ctc3 "control to coprocessor 3" (MACH2000 USES-RT)
(dni ctc3 "control to coprocessor 3" (MACH2000 USES-RT)
     "ctc3 $rt,$rd"
     "ctc3 $rt,$rd"
     (+ OP_COP3 (f-rs 6) rt rd (f-10-11 0))
     (+ OP_COP3 (f-rs 6) rt rd (f-10-11 0))
     (unimp ctc3)
     (unimp ctc3)
     ())
     ())
(dni jcr "jump context register" (MACH2000 DELAY-SLOT UNCOND-CTI USES-RS)
(dni jcr "jump context register" (MACH2000 DELAY-SLOT UNCOND-CTI USES-RS)
     "jcr $rs"
     "jcr $rs"
     (+ OP_SPECIAL rs (f-rt 0) (f-rd 0) (f-shamt 0) FUNC_JCR)
     (+ OP_SPECIAL rs (f-rt 0) (f-rd 0) (f-shamt 0) FUNC_JCR)
     (unimp jcr)
     (unimp jcr)
     ())
     ())
(dni luc32 "lookup chain 32 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni luc32 "lookup chain 32 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "luc32 $rt,$rd"
     "luc32 $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 3))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 3))
     (unimp luc32)
     (unimp luc32)
     ())
     ())
(dni luc32l "lookup chain 32 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni luc32l "lookup chain 32 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "luc32l $rt,$rd"
     "luc32l $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 7))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 7))
     (unimp luc32l)
     (unimp luc32l)
     ())
     ())
(dni luc64 "lookup chain 64 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni luc64 "lookup chain 64 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "luc64 $rt,$rd"
     "luc64 $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 11))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 11))
     (unimp luc64)
     (unimp luc64)
     ())
     ())
(dni luc64l "lookup chain 64 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni luc64l "lookup chain 64 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "luc64l $rt,$rd"
     "luc64l $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 15))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 15))
     (unimp luc64l)
     (unimp luc64l)
     ())
     ())
(dni luk "lookup key" (MACH2000 USES-RD USES-RT)
(dni luk "lookup key" (MACH2000 USES-RD USES-RT)
     "luk $rt,$rd"
     "luk $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 8))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 8))
     (unimp luk)
     (unimp luk)
     ())
     ())
(dni lulck "lookup lock" (MACH2000 USES-RT YIELD-INSN)
(dni lulck "lookup lock" (MACH2000 USES-RT YIELD-INSN)
     "lulck $rt"
     "lulck $rt"
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 4))
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 4))
     (unimp lulck)
     (unimp lulck)
     ())
     ())
(dni lum32 "lookup match 32 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lum32 "lookup match 32 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lum32 $rt,$rd"
     "lum32 $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 2))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 2))
     (unimp lum32)
     (unimp lum32)
     ())
     ())
(dni lum32l "lookup match 32 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lum32l "lookup match 32 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lum32l $rt,$rd"
     "lum32l $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 6))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 6))
     (unimp lum32l)
     (unimp lum32l)
     ())
     ())
(dni lum64 "lookup match 64 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lum64 "lookup match 64 bits" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lum64 $rt,$rd"
     "lum64 $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 10))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 10))
     (unimp lum64)
     (unimp lum64)
     ())
     ())
(dni lum64l "lookup match 64 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lum64l "lookup match 64 bits and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lum64l $rt,$rd"
     "lum64l $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 14))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 14))
     (unimp lum64l)
     (unimp lum64l)
     ())
     ())
(dni lur "lookup read" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lur "lookup read" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lur $rt,$rd"
     "lur $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 1))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 1))
     (unimp lur)
     (unimp lur)
     ())
     ())
(dni lurl "lookup read and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni lurl "lookup read and lock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "lurl $rt,$rd"
     "lurl $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 5))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 5))
     (unimp lurl)
     (unimp lurl)
     ())
     ())
(dni luulck "lookup unlock" (MACH2000 USES-RT YIELD-INSN)
(dni luulck "lookup unlock" (MACH2000 USES-RT YIELD-INSN)
     "luulck $rt"
     "luulck $rt"
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 0))
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 0))
     (unimp luulck)
     (unimp luulck)
     ())
     ())
(dni mfc0 "move from coprocessor 0" (MACH2000 LOAD-DELAY USES-RT)
(dni mfc0 "move from coprocessor 0" (MACH2000 LOAD-DELAY USES-RT)
     "mfc0 $rt,$rd"
     "mfc0 $rt,$rd"
     (+ OP_COP0 (f-rs 0) rt rd (f-10-11 0))
     (+ OP_COP0 (f-rs 0) rt rd (f-10-11 0))
     (unimp mfc0)
     (unimp mfc0)
     ())
     ())
(dni mfc1 "move from coprocessor 1" (MACH2000 LOAD-DELAY USES-RT)
(dni mfc1 "move from coprocessor 1" (MACH2000 LOAD-DELAY USES-RT)
     "mfc1 $rt,$rd"
     "mfc1 $rt,$rd"
     (+ OP_COP1 (f-rs 0) rt rd (f-10-11 0))
     (+ OP_COP1 (f-rs 0) rt rd (f-10-11 0))
     (unimp mfc1)
     (unimp mfc1)
     ())
     ())
(dni mfc2 "move from coprocessor 2" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
(dni mfc2 "move from coprocessor 2" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
     "mfc2 $rt,$rd"
     "mfc2 $rt,$rd"
     (+ OP_COP2 (f-rs 0) rt rd (f-10-11 0))
     (+ OP_COP2 (f-rs 0) rt rd (f-10-11 0))
     (unimp mfc2)
     (unimp mfc2)
     ())
     ())
(dni mfc3 "move from coprocessor 3" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
(dni mfc3 "move from coprocessor 3" (MACH2000 LOAD-DELAY USES-RT YIELD-INSN)
     "mfc3 $rt,$rd"
     "mfc3 $rt,$rd"
     (+ OP_COP3 (f-rs 0) rt rd (f-10-11 0))
     (+ OP_COP3 (f-rs 0) rt rd (f-10-11 0))
     (unimp mfc3)
     (unimp mfc3)
     ())
     ())
(dni mtc0 "move to coprocessor 0" (MACH2000 USES-RT)
(dni mtc0 "move to coprocessor 0" (MACH2000 USES-RT)
     "mtc0 $rt,$rd"
     "mtc0 $rt,$rd"
     (+ OP_COP0 (f-rs 4) rt rd (f-10-11 0))
     (+ OP_COP0 (f-rs 4) rt rd (f-10-11 0))
     (unimp mtc0)
     (unimp mtc0)
     ())
     ())
(dni mtc1 "move to coprocessor 1" (MACH2000 USES-RT)
(dni mtc1 "move to coprocessor 1" (MACH2000 USES-RT)
     "mtc1 $rt,$rd"
     "mtc1 $rt,$rd"
     (+ OP_COP1 (f-rs 4) rt rd (f-10-11 0))
     (+ OP_COP1 (f-rs 4) rt rd (f-10-11 0))
     (unimp mtc1)
     (unimp mtc1)
     ())
     ())
(dni mtc2 "move to coprocessor 2" (MACH2000 USES-RT)
(dni mtc2 "move to coprocessor 2" (MACH2000 USES-RT)
     "mtc2 $rt,$rd"
     "mtc2 $rt,$rd"
     (+ OP_COP2 (f-rs 4) rt rd (f-10-11 0))
     (+ OP_COP2 (f-rs 4) rt rd (f-10-11 0))
     (unimp mtc2)
     (unimp mtc2)
     ())
     ())
(dni mtc3 "move to coprocessor 3" (MACH2000 USES-RT)
(dni mtc3 "move to coprocessor 3" (MACH2000 USES-RT)
     "mtc3 $rt,$rd"
     "mtc3 $rt,$rd"
     (+ OP_COP3 (f-rs 4) rt rd (f-10-11 0))
     (+ OP_COP3 (f-rs 4) rt rd (f-10-11 0))
     (unimp mtc3)
     (unimp mtc3)
     ())
     ())
(dni pkrl "pkrl" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni pkrl "pkrl" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "pkrl $rd,$rt"
     "pkrl $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 7))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 7))
     (unimp pkrl)
     (unimp pkrl)
     ())
     ())
(dni pkrlr1 "pkrlr1" (MACH2000 USES-RT YIELD-INSN)
(dni pkrlr1 "pkrlr1" (MACH2000 USES-RT YIELD-INSN)
     "pkrlr1 $rt,$_index,$count"
     "pkrlr1 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 29) rt count _index)
     (+ OP_COP3 (f-rs 29) rt count _index)
     (unimp pkrlr1)
     (unimp pkrlr1)
     ())
     ())
(dni pkrlr30 "pkrlr30" (MACH2000 USES-RT YIELD-INSN)
(dni pkrlr30 "pkrlr30" (MACH2000 USES-RT YIELD-INSN)
     "pkrlr30 $rt,$_index,$count"
     "pkrlr30 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 31) rt count _index)
     (+ OP_COP3 (f-rs 31) rt count _index)
     (unimp pkrlr30)
     (unimp pkrlr30)
     ())
     ())
(dni rb "dma read bytes" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni rb "dma read bytes" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "rb $rd,$rt"
     "rb $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 4))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 4))
     (unimp rb)
     (unimp rb)
     ())
     ())
(dni rbr1 "dma read bytes using r1" (MACH2000 USES-RT YIELD-INSN)
(dni rbr1 "dma read bytes using r1" (MACH2000 USES-RT YIELD-INSN)
     "rbr1 $rt,$_index,$count"
     "rbr1 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 24) rt count _index)
     (+ OP_COP3 (f-rs 24) rt count _index)
     (unimp rbr1)
     (unimp rbr1)
     ())
     ())
(dni rbr30 "dma read bytes using r30" (MACH2000 USES-RT YIELD-INSN)
(dni rbr30 "dma read bytes using r30" (MACH2000 USES-RT YIELD-INSN)
     "rbr30 $rt,$_index,$count"
     "rbr30 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 26) rt count _index)
     (+ OP_COP3 (f-rs 26) rt count _index)
     (unimp rbr30)
     (unimp rbr30)
     ())
     ())
(dni rfe "restore from exception" (MACH2000)
(dni rfe "restore from exception" (MACH2000)
     "rfe"
     "rfe"
     (+ OP_COP0 (f-25 1) (f-24-19 0) (f-func 16))
     (+ OP_COP0 (f-25 1) (f-24-19 0) (f-func 16))
     (unimp rfe)
     (unimp rfe)
     ())
     ())
(dni rx "dma read word64s" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni rx "dma read word64s" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "rx $rd,$rt"
     "rx $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 6))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 6))
     (unimp rx)
     (unimp rx)
     ())
     ())
(dni rxr1 "dma read word64s using r1" (MACH2000 USES-RT YIELD-INSN)
(dni rxr1 "dma read word64s using r1" (MACH2000 USES-RT YIELD-INSN)
     "rxr1 $rt,$_index,$count"
     "rxr1 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 28) rt count _index)
     (+ OP_COP3 (f-rs 28) rt count _index)
     (unimp rxr1)
     (unimp rxr1)
     ())
     ())
(dni rxr30 "dma read word 64s using r30" (MACH2000 USES-RT YIELD-INSN)
(dni rxr30 "dma read word 64s using r30" (MACH2000 USES-RT YIELD-INSN)
     "rxr30 $rt,$_index,$count"
     "rxr30 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 30) rt count _index)
     (+ OP_COP3 (f-rs 30) rt count _index)
     (unimp rxr30)
     (unimp rxr30)
     ())
     ())
(dni sleep "sleep" (MACH2000 YIELD-INSN)
(dni sleep "sleep" (MACH2000 YIELD-INSN)
     "sleep"
     "sleep"
     (+ OP_SPECIAL execode FUNC_SLEEP)
     (+ OP_SPECIAL execode FUNC_SLEEP)
     (unimp sleep)
     (unimp sleep)
     ())
     ())
(dni srrd "sram read" (MACH2000 USES-RT YIELD-INSN)
(dni srrd "sram read" (MACH2000 USES-RT YIELD-INSN)
     "srrd $rt"
     "srrd $rt"
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 16))
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 16))
     (unimp srrd)
     (unimp srrd)
     ())
     ())
(dni srrdl "sram read and lock" (MACH2000 USES-RT YIELD-INSN)
(dni srrdl "sram read and lock" (MACH2000 USES-RT YIELD-INSN)
     "srrdl $rt"
     "srrdl $rt"
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 20))
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 20))
     (unimp srrdl)
     (unimp srrdl)
     ())
     ())
(dni srulck "sram unlock" (MACH2000 USES-RT YIELD-INSN)
(dni srulck "sram unlock" (MACH2000 USES-RT YIELD-INSN)
     "srulck $rt"
     "srulck $rt"
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 22))
     (+ OP_COP2 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 22))
     (unimp srulck)
     (unimp srulck)
     ())
     ())
(dni srwr "sram write" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni srwr "sram write" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "srwr $rt,$rd"
     "srwr $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 17))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 17))
     (unimp srwr)
     (unimp srwr)
     ())
     ())
(dni srwru "sram write and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni srwru "sram write and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "srwru $rt,$rd"
     "srwru $rt,$rd"
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 21))
     (+ OP_COP2 (f-rs 1) rt rd (f-shamt 0) (f-func 21))
     (unimp srwru)
     (unimp srwru)
     ())
     ())
(dni trapqfl "yield if dma queue full" (MACH2000 YIELD-INSN)
(dni trapqfl "yield if dma queue full" (MACH2000 YIELD-INSN)
     "trapqfl"
     "trapqfl"
     (+ OP_COP3 (f-rs 1) (f-rt 0) (f-rd 0) (f-shamt 0) (f-func 8))
     (+ OP_COP3 (f-rs 1) (f-rt 0) (f-rd 0) (f-shamt 0) (f-func 8))
     (unimp trapqfl)
     (unimp trapqfl)
     ())
     ())
(dni trapqne "yield if dma queue not empty" (MACH2000 YIELD-INSN)
(dni trapqne "yield if dma queue not empty" (MACH2000 YIELD-INSN)
     "trapqne"
     "trapqne"
     (+ OP_COP3 (f-rs 1) (f-rt 0) (f-rd 0) (f-shamt 0) (f-func 9))
     (+ OP_COP3 (f-rs 1) (f-rt 0) (f-rd 0) (f-shamt 0) (f-func 9))
     (unimp trapqne)
     (unimp trapqne)
     ())
     ())
(dni traprel "traprel" (MACH2000 USES-RT YIELD-INSN)
(dni traprel "traprel" (MACH2000 USES-RT YIELD-INSN)
     "traprel $rt"
     "traprel $rt"
     (+ OP_COP3 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 10))
     (+ OP_COP3 (f-rs 1) rt (f-rd 0) (f-shamt 0) (f-func 10))
     (unimp traprel)
     (unimp traprel)
     ())
     ())
(dni wb "dma write bytes" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni wb "dma write bytes" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "wb $rd,$rt"
     "wb $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 0))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 0))
     (unimp wb)
     (unimp wb)
     ())
     ())
(dni wbu "dma write bytes and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni wbu "dma write bytes and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "wbu $rd,$rt"
     "wbu $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 1))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 1))
     (unimp wbu)
     (unimp wbu)
     ())
     ())
(dni wbr1 "dma write bytes using r1" (MACH2000 USES-RT YIELD-INSN)
(dni wbr1 "dma write bytes using r1" (MACH2000 USES-RT YIELD-INSN)
     "wbr1 $rt,$_index,$count"
     "wbr1 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 16) rt count _index)
     (+ OP_COP3 (f-rs 16) rt count _index)
     (unimp wbr1)
     (unimp wbr1)
     ())
     ())
(dni wbr1u "dma write bytes using r1 and unlock" (MACH2000 USES-RT YIELD-INSN)
(dni wbr1u "dma write bytes using r1 and unlock" (MACH2000 USES-RT YIELD-INSN)
     "wbr1u $rt,$_index,$count"
     "wbr1u $rt,$_index,$count"
     (+ OP_COP3 (f-rs 17) rt count _index)
     (+ OP_COP3 (f-rs 17) rt count _index)
     (unimp wbr1u)
     (unimp wbr1u)
     ())
     ())
(dni wbr30 "dma write bytes using r30" (MACH2000 USES-RT YIELD-INSN)
(dni wbr30 "dma write bytes using r30" (MACH2000 USES-RT YIELD-INSN)
     "wbr30 $rt,$_index,$count"
     "wbr30 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 18) rt count _index)
     (+ OP_COP3 (f-rs 18) rt count _index)
     (unimp wbr30)
     (unimp wbr30)
     ())
     ())
(dni wbr30u "dma write bytes using r30 and unlock" (MACH2000 USES-RT YIELD-INSN)
(dni wbr30u "dma write bytes using r30 and unlock" (MACH2000 USES-RT YIELD-INSN)
     "wbr30u $rt,$_index,$count"
     "wbr30u $rt,$_index,$count"
     (+ OP_COP3 (f-rs 19) rt count _index)
     (+ OP_COP3 (f-rs 19) rt count _index)
     (unimp wbr30u)
     (unimp wbr30u)
     ())
     ())
(dni wx "dma write word64s" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni wx "dma write word64s" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "wx $rd,$rt"
     "wx $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 2))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 2))
     (unimp wx)
     (unimp wx)
     ())
     ())
(dni wxu "dma write word64s and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
(dni wxu "dma write word64s and unlock" (MACH2000 USES-RD USES-RT YIELD-INSN)
     "wxu $rd,$rt"
     "wxu $rd,$rt"
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 3))
     (+ OP_COP3 (f-rs 1) rt rd (f-shamt 0) (f-func 3))
     (unimp wxu)
     (unimp wxu)
     ())
     ())
(dni wxr1 "dma write word64s using r1" (MACH2000 USES-RT YIELD-INSN)
(dni wxr1 "dma write word64s using r1" (MACH2000 USES-RT YIELD-INSN)
     "wxr1 $rt,$_index,$count"
     "wxr1 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 20) rt count _index)
     (+ OP_COP3 (f-rs 20) rt count _index)
     (unimp wxr1)
     (unimp wxr1)
     ())
     ())
(dni wxr1u "dma write word64s using r1 and unlock" (MACH2000 USES-RT YIELD-INSN)
(dni wxr1u "dma write word64s using r1 and unlock" (MACH2000 USES-RT YIELD-INSN)
     "wxr1u $rt,$_index,$count"
     "wxr1u $rt,$_index,$count"
     (+ OP_COP3 (f-rs 21) rt count _index)
     (+ OP_COP3 (f-rs 21) rt count _index)
     (unimp wxr1u)
     (unimp wxr1u)
     ())
     ())
(dni wxr30 "dma write word64s using r30" (MACH2000 USES-RT YIELD-INSN)
(dni wxr30 "dma write word64s using r30" (MACH2000 USES-RT YIELD-INSN)
     "wxr30 $rt,$_index,$count"
     "wxr30 $rt,$_index,$count"
     (+ OP_COP3 (f-rs 22) rt count _index)
     (+ OP_COP3 (f-rs 22) rt count _index)
     (unimp wxr30)
     (unimp wxr30)
     ())
     ())
(dni wxr30u "dma write word64s using r30 and unlock" (MACH2000 USES-RT YIELD-INSN)
(dni wxr30u "dma write word64s using r30 and unlock" (MACH2000 USES-RT YIELD-INSN)
     "wxr30u $rt,$_index,$count"
     "wxr30u $rt,$_index,$count"
     (+ OP_COP3 (f-rs 23) rt count _index)
     (+ OP_COP3 (f-rs 23) rt count _index)
     (unimp wxr30u)
     (unimp wxr30u)
     ())
     ())
; Load/Store instructions.
; Load/Store instructions.
(dni ldw "load double word" (MACH2000 EVEN-REG-NUM LOAD-DELAY USES-RT)
(dni ldw "load double word" (MACH2000 EVEN-REG-NUM LOAD-DELAY USES-RT)
     "ldw $rt,$lo16($base)"
     "ldw $rt,$lo16($base)"
     (+ OP_LDW base rt lo16)
     (+ OP_LDW base rt lo16)
     (sequence ((SI addr))
     (sequence ((SI addr))
               (set addr (and (add base lo16) (inv 3)))
               (set addr (and (add base lo16) (inv 3)))
               (set (reg h-gr (add (ifield f-rt) 1)) (mem SI addr))
               (set (reg h-gr (add (ifield f-rt) 1)) (mem SI addr))
               (set rt (mem SI (add addr 4))))
               (set rt (mem SI (add addr 4))))
     ())
     ())
(dni sdw "store double word" (MACH2000 EVEN-REG-NUM USES-RT)
(dni sdw "store double word" (MACH2000 EVEN-REG-NUM USES-RT)
     "sdw $rt,$lo16($base)"
     "sdw $rt,$lo16($base)"
     (+ OP_SDW base rt lo16)
     (+ OP_SDW base rt lo16)
     (sequence ((SI addr))
     (sequence ((SI addr))
               (set addr (and (add base lo16) (inv 3)))
               (set addr (and (add base lo16) (inv 3)))
               (set (mem SI (add addr 4)) rt)
               (set (mem SI (add addr 4)) rt)
               (set (mem SI addr) (reg h-gr (add (ifield f-rt) 1))))
               (set (mem SI addr) (reg h-gr (add (ifield f-rt) 1))))
     ())
     ())
; Jump instructions
; Jump instructions
(dni j "jump" (MACH2000)
(dni j "jump" (MACH2000)
     "j $jmptarg"
     "j $jmptarg"
     (+ OP_J (f-rsrvd 0) jmptarg)
     (+ OP_J (f-rsrvd 0) jmptarg)
     (delay 1 (set pc jmptarg))
     (delay 1 (set pc jmptarg))
     ())
     ())
(dni jal "jump and link" (MACH2000 USES-R31)
(dni jal "jump and link" (MACH2000 USES-R31)
     "jal $jmptarg"
     "jal $jmptarg"
     (+ OP_JAL (f-rsrvd 0) jmptarg)
     (+ OP_JAL (f-rsrvd 0) jmptarg)
     (delay 1
     (delay 1
            (sequence ()
            (sequence ()
                      (set (reg h-gr 31) (add pc 8))
                      (set (reg h-gr 31) (add pc 8))
                      (set pc jmptarg)))
                      (set pc jmptarg)))
     ())
     ())
(dni bmb "branch if matching byte-lane" (MACH2000 USES-RS USES-RT)
(dni bmb "branch if matching byte-lane" (MACH2000 USES-RS USES-RT)
     "bmb $rs,$rt,$offset"
     "bmb $rs,$rt,$offset"
     (+ OP_BMB rs rt offset)
     (+ OP_BMB rs rt offset)
     (sequence ((BI branch?))
     (sequence ((BI branch?))
               (set branch? 0)
               (set branch? 0)
               (if (eq (and rs #xFF) (and rt #xFF))
               (if (eq (and rs #xFF) (and rt #xFF))
                   (set branch? 1))
                   (set branch? 1))
               (if (eq (and rs #xFF00) (and rt #xFF00))
               (if (eq (and rs #xFF00) (and rt #xFF00))
                   (set branch? 1))
                   (set branch? 1))
               (if (eq (and rs #xFF0000) (and rt #xFF0000))
               (if (eq (and rs #xFF0000) (and rt #xFF0000))
                   (set branch? 1))
                   (set branch? 1))
               (if (eq (and rs #xFF000000) (and rt #xFF000000))
               (if (eq (and rs #xFF000000) (and rt #xFF000000))
                   (set branch? 1))
                   (set branch? 1))
               (if branch?
               (if branch?
                   (delay 1 (set pc offset))))
                   (delay 1 (set pc offset))))
     ())
     ())
; Macros
; Macros
(dnmi ldw-base-0 "load double word - implied base 0" (MACH2000 EVEN-REG-NUM LOAD-DELAY USES-RT USES-RS NO-DIS)
(dnmi ldw-base-0 "load double word - implied base 0" (MACH2000 EVEN-REG-NUM LOAD-DELAY USES-RT USES-RS NO-DIS)
      "ldw $rt,$lo16"
      "ldw $rt,$lo16"
      (emit ldw rt lo16 (base 0))
      (emit ldw rt lo16 (base 0))
)
)
(dnmi sdw-base-0 "store double word - implied base 0" (MACH2000 EVEN-REG-NUM USES-RT NO-DIS)
(dnmi sdw-base-0 "store double word - implied base 0" (MACH2000 EVEN-REG-NUM USES-RT NO-DIS)
      "sdw $rt,$lo16"
      "sdw $rt,$lo16"
      (emit sdw rt lo16 (base 0))
      (emit sdw rt lo16 (base 0))
)
)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.