bitfields.isa revision 4661
12124SN/A// -*- mode:c++ -*- 22124SN/A 32754Sksewell@umich.edu// Copyright (c) 2006 The Regents of The University of Michigan 42706Sksewell@umich.edu// All rights reserved. 52706Sksewell@umich.edu// 62706Sksewell@umich.edu// Redistribution and use in source and binary forms, with or without 72706Sksewell@umich.edu// modification, are permitted provided that the following conditions are 82706Sksewell@umich.edu// met: redistributions of source code must retain the above copyright 92706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer; 102706Sksewell@umich.edu// redistributions in binary form must reproduce the above copyright 112706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer in the 122706Sksewell@umich.edu// documentation and/or other materials provided with the distribution; 132706Sksewell@umich.edu// neither the name of the copyright holders nor the names of its 142706Sksewell@umich.edu// contributors may be used to endorse or promote products derived from 152706Sksewell@umich.edu// this software without specific prior written permission. 162706Sksewell@umich.edu// 172706Sksewell@umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182706Sksewell@umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192706Sksewell@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202706Sksewell@umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212706Sksewell@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222706Sksewell@umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232706Sksewell@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242706Sksewell@umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252706Sksewell@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262706Sksewell@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272706Sksewell@umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282706Sksewell@umich.edu// 292706Sksewell@umich.edu// Authors: Korey Sewell 302706Sksewell@umich.edu 314661Sksewell@umich.edu//@TODO: Make sure the naming convention is consistent here. 322022SN/A//////////////////////////////////////////////////////////////////// 332022SN/A// 342022SN/A// Bitfield definitions. 352022SN/A// 362022SN/A 372135SN/Adef bitfield OPCODE <31:26>; 382025SN/Adef bitfield OPCODE_HI <31:29>; 392025SN/Adef bitfield OPCODE_LO <28:26>; 402022SN/A 412135SN/Adef bitfield REGIMM <20:16>; 422135SN/Adef bitfield REGIMM_HI <20:19>; 432135SN/Adef bitfield REGIMM_LO <18:16>; 442135SN/A 452135SN/Adef bitfield FUNCTION < 5: 0>; 462026SN/Adef bitfield FUNCTION_HI < 5: 3>; 472026SN/Adef bitfield FUNCTION_LO < 2: 0>; 482025SN/A 492026SN/Adef bitfield RS <25:21>; 502061SN/Adef bitfield RS_MSB <25:25>; 512026SN/Adef bitfield RS_HI <25:24>; 522026SN/Adef bitfield RS_LO <23:21>; 532686Sksewell@umich.edudef bitfield RS_SRL <25:22>; 542686Sksewell@umich.edudef bitfield RS_RT <25:16>; 552686Sksewell@umich.edudef bitfield RT <20:16>; 562686Sksewell@umich.edudef bitfield RT_HI <20:19>; 572686Sksewell@umich.edudef bitfield RT_LO <18:16>; 582686Sksewell@umich.edudef bitfield RT_RD <20:11>; 592029SN/Adef bitfield RD <15:11>; 602026SN/A 612686Sksewell@umich.edudef bitfield INTIMM <15: 0>; 624661Sksewell@umich.edudef bitfield RS_RT_INTIMM <25: 0>; 632041SN/A 642029SN/A// Floating-point operate format 652041SN/Adef bitfield FMT <25:21>; 662239SN/Adef bitfield FR <25:21>; 672029SN/Adef bitfield FT <20:16>; 682029SN/Adef bitfield FS <15:11>; 692029SN/Adef bitfield FD <10:6>; 702029SN/A 712135SN/Adef bitfield ND <17:17>; 722135SN/Adef bitfield TF <16:16>; 732029SN/Adef bitfield MOVCI <16:16>; 742029SN/Adef bitfield MOVCF <16:16>; 752029SN/Adef bitfield SRL <21:21>; 762029SN/Adef bitfield SRLV < 6: 6>; 772029SN/Adef bitfield SA <10: 6>; 782029SN/A 792601SN/A// Floating Point Condition Codes 802601SN/Adef bitfield CC <10:8>; 812601SN/Adef bitfield BRANCH_CC <20:18>; 822601SN/A 832239SN/A// CP0 Register Select 842239SN/Adef bitfield SEL < 2: 0>; 852239SN/A 864661Sksewell@umich.edu// INTERRUPTS 872029SN/Adef bitfield SC < 5: 5>; 882025SN/A 892029SN/A// Branch format 902029SN/Adef bitfield OFFSET <15: 0>; // displacement 912025SN/A 922124SN/A// Jmp format 932043SN/Adef bitfield JMPTARG <25: 0>; 942135SN/Adef bitfield HINT <10: 6>; 952025SN/A 962043SN/Adef bitfield SYSCALLCODE <25: 6>; 972043SN/Adef bitfield TRAPCODE <15:13>; 982025SN/A 992686Sksewell@umich.edu// EXT/INS instructions 1002686Sksewell@umich.edudef bitfield MSB <15:11>; 1012686Sksewell@umich.edudef bitfield LSB <10: 6>; 1022686Sksewell@umich.edu 1032025SN/A// M5 instructions 1042025SN/Adef bitfield M5FUNC <7:0>; 1054661Sksewell@umich.edu 1064661Sksewell@umich.edu// DSP instructions 1074661Sksewell@umich.edudef bitfield OP <10:6>; 1084661Sksewell@umich.edudef bitfield OP_HI <10:9>; 1094661Sksewell@umich.edudef bitfield OP_LO <8:6>; 1104661Sksewell@umich.edudef bitfield DSPSA <23:21>; 1114661Sksewell@umich.edudef bitfield HILOSA <25:20>; 1124661Sksewell@umich.edudef bitfield RDDSPMASK <21:16>; 1134661Sksewell@umich.edudef bitfield WRDSPMASK <16:11>; 1144661Sksewell@umich.edudef bitfield ACSRC <22:21>; 1154661Sksewell@umich.edudef bitfield ACDST <12:11>; 1164661Sksewell@umich.edudef bitfield BP <12:11>; 1174661Sksewell@umich.edu 1184661Sksewell@umich.edu// MT Instructions 1194661Sksewell@umich.edudef bitfield POS <10: 6>; 1204661Sksewell@umich.edudef bitfield MT_U <5:5>; 1214661Sksewell@umich.edudef bitfield MT_H <4:4>; 122