2006-02-20 20:30:23 +01:00
|
|
|
// -*- mode:c++ -*-
|
|
|
|
|
2007-11-17 03:32:22 +01:00
|
|
|
// Copyright (c) 2007 MIPS Technologies, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are
|
|
|
|
// met: redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer;
|
|
|
|
// redistributions in binary form must reproduce the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
|
|
// documentation and/or other materials provided with the distribution;
|
|
|
|
// neither the name of the copyright holders nor the names of its
|
|
|
|
// contributors may be used to endorse or promote products derived from
|
|
|
|
// this software without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
|
|
|
// Authors: Korey Sewell
|
|
|
|
// Jaidev Patwardhan
|
2006-06-10 00:19:08 +02:00
|
|
|
|
2006-01-10 20:57:37 +01:00
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Bitfield definitions.
|
|
|
|
//
|
|
|
|
|
2006-02-22 09:33:35 +01:00
|
|
|
def bitfield OPCODE <31:26>;
|
2006-01-25 23:06:23 +01:00
|
|
|
def bitfield OPCODE_HI <31:29>;
|
|
|
|
def bitfield OPCODE_LO <28:26>;
|
|
|
|
|
2006-02-22 09:33:35 +01:00
|
|
|
def bitfield REGIMM <20:16>;
|
|
|
|
def bitfield REGIMM_HI <20:19>;
|
|
|
|
def bitfield REGIMM_LO <18:16>;
|
|
|
|
|
|
|
|
def bitfield FUNCTION < 5: 0>;
|
2006-01-25 23:36:38 +01:00
|
|
|
def bitfield FUNCTION_HI < 5: 3>;
|
|
|
|
def bitfield FUNCTION_LO < 2: 0>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-01-25 23:36:38 +01:00
|
|
|
def bitfield RS <25:21>;
|
2006-02-14 08:03:14 +01:00
|
|
|
def bitfield RS_MSB <25:25>;
|
2006-01-25 23:36:38 +01:00
|
|
|
def bitfield RS_HI <25:24>;
|
|
|
|
def bitfield RS_LO <23:21>;
|
2006-06-09 09:57:25 +02:00
|
|
|
def bitfield RS_SRL <25:22>;
|
|
|
|
def bitfield RS_RT <25:16>;
|
|
|
|
def bitfield RT <20:16>;
|
|
|
|
def bitfield RT_HI <20:19>;
|
|
|
|
def bitfield RT_LO <18:16>;
|
|
|
|
def bitfield RT_RD <20:11>;
|
2006-01-26 23:07:01 +01:00
|
|
|
def bitfield RD <15:11>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-06-09 09:57:25 +02:00
|
|
|
def bitfield INTIMM <15: 0>;
|
2007-06-23 01:03:42 +02:00
|
|
|
def bitfield RS_RT_INTIMM <25: 0>;
|
2006-02-04 05:04:06 +01:00
|
|
|
|
2006-01-25 23:06:23 +01:00
|
|
|
// Floating-point operate format
|
2006-02-04 05:04:06 +01:00
|
|
|
def bitfield FMT <25:21>;
|
2006-03-08 08:05:38 +01:00
|
|
|
def bitfield FR <25:21>;
|
2006-01-26 23:07:01 +01:00
|
|
|
def bitfield FT <20:16>;
|
|
|
|
def bitfield FS <15:11>;
|
|
|
|
def bitfield FD <10:6>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-02-22 09:33:35 +01:00
|
|
|
def bitfield ND <17:17>;
|
|
|
|
def bitfield TF <16:16>;
|
2006-01-26 23:07:01 +01:00
|
|
|
def bitfield MOVCI <16:16>;
|
|
|
|
def bitfield MOVCF <16:16>;
|
|
|
|
def bitfield SRL <21:21>;
|
|
|
|
def bitfield SRLV < 6: 6>;
|
|
|
|
def bitfield SA <10: 6>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-05-08 09:59:40 +02:00
|
|
|
// Floating Point Condition Codes
|
|
|
|
def bitfield CC <10:8>;
|
|
|
|
def bitfield BRANCH_CC <20:18>;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
// CP0 Register Select
|
|
|
|
def bitfield SEL < 2: 0>;
|
|
|
|
|
2007-06-23 01:03:42 +02:00
|
|
|
// INTERRUPTS
|
2006-01-26 23:07:01 +01:00
|
|
|
def bitfield SC < 5: 5>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-01-26 23:07:01 +01:00
|
|
|
// Branch format
|
|
|
|
def bitfield OFFSET <15: 0>; // displacement
|
|
|
|
|
2006-02-20 20:30:23 +01:00
|
|
|
// Jmp format
|
2006-02-08 00:36:08 +01:00
|
|
|
def bitfield JMPTARG <25: 0>;
|
2006-02-22 09:33:35 +01:00
|
|
|
def bitfield HINT <10: 6>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-02-08 00:36:08 +01:00
|
|
|
def bitfield SYSCALLCODE <25: 6>;
|
|
|
|
def bitfield TRAPCODE <15:13>;
|
2006-01-25 23:06:23 +01:00
|
|
|
|
2006-06-09 09:57:25 +02:00
|
|
|
// EXT/INS instructions
|
|
|
|
def bitfield MSB <15:11>;
|
|
|
|
def bitfield LSB <10: 6>;
|
|
|
|
|
2006-01-25 23:06:23 +01:00
|
|
|
// M5 instructions
|
|
|
|
def bitfield M5FUNC <7:0>;
|
2007-06-23 01:03:42 +02:00
|
|
|
|
|
|
|
// DSP instructions
|
|
|
|
def bitfield OP <10:6>;
|
|
|
|
def bitfield OP_HI <10:9>;
|
|
|
|
def bitfield OP_LO <8:6>;
|
|
|
|
def bitfield DSPSA <23:21>;
|
|
|
|
def bitfield HILOSA <25:20>;
|
|
|
|
def bitfield RDDSPMASK <21:16>;
|
|
|
|
def bitfield WRDSPMASK <16:11>;
|
|
|
|
def bitfield ACSRC <22:21>;
|
|
|
|
def bitfield ACDST <12:11>;
|
|
|
|
def bitfield BP <12:11>;
|
|
|
|
|
|
|
|
// MT Instructions
|
|
|
|
def bitfield POS <10: 6>;
|
|
|
|
def bitfield MT_U <5:5>;
|
|
|
|
def bitfield MT_H <4:4>;
|
2007-11-13 22:58:16 +01:00
|
|
|
|
|
|
|
//Cache Ops
|
|
|
|
def bitfield CACHE_OP <20:16>;
|