bitfields.isa revision 2706
12124SN/A// -*- mode:c++ -*- 22124SN/A 32706Sksewell@umich.edu// Copyright (c) 2003-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 312022SN/A//////////////////////////////////////////////////////////////////// 322022SN/A// 332022SN/A// Bitfield definitions. 342022SN/A// 352022SN/A 362135SN/Adef bitfield OPCODE <31:26>; 372025SN/Adef bitfield OPCODE_HI <31:29>; 382025SN/Adef bitfield OPCODE_LO <28:26>; 392022SN/A 402135SN/Adef bitfield REGIMM <20:16>; 412135SN/Adef bitfield REGIMM_HI <20:19>; 422135SN/Adef bitfield REGIMM_LO <18:16>; 432135SN/A 442135SN/Adef bitfield FUNCTION < 5: 0>; 452026SN/Adef bitfield FUNCTION_HI < 5: 3>; 462026SN/Adef bitfield FUNCTION_LO < 2: 0>; 472025SN/A 482026SN/Adef bitfield RS <25:21>; 492061SN/Adef bitfield RS_MSB <25:25>; 502026SN/Adef bitfield RS_HI <25:24>; 512026SN/Adef bitfield RS_LO <23:21>; 522686Sksewell@umich.edudef bitfield RS_SRL <25:22>; 532686Sksewell@umich.edudef bitfield RS_RT <25:16>; 542686Sksewell@umich.edudef bitfield RT <20:16>; 552686Sksewell@umich.edudef bitfield RT_HI <20:19>; 562686Sksewell@umich.edudef bitfield RT_LO <18:16>; 572686Sksewell@umich.edudef bitfield RT_RD <20:11>; 582029SN/Adef bitfield RD <15:11>; 592026SN/A 602686Sksewell@umich.edudef bitfield INTIMM <15: 0>; 612041SN/A 622029SN/A// Floating-point operate format 632041SN/Adef bitfield FMT <25:21>; 642239SN/Adef bitfield FR <25:21>; 652029SN/Adef bitfield FT <20:16>; 662029SN/Adef bitfield FS <15:11>; 672029SN/Adef bitfield FD <10:6>; 682029SN/A 692135SN/Adef bitfield ND <17:17>; 702135SN/Adef bitfield TF <16:16>; 712029SN/Adef bitfield MOVCI <16:16>; 722029SN/Adef bitfield MOVCF <16:16>; 732029SN/Adef bitfield SRL <21:21>; 742029SN/Adef bitfield SRLV < 6: 6>; 752029SN/Adef bitfield SA <10: 6>; 762029SN/A 772601SN/A// Floating Point Condition Codes 782601SN/Adef bitfield CC <10:8>; 792601SN/Adef bitfield BRANCH_CC <20:18>; 802601SN/A 812239SN/A// CP0 Register Select 822239SN/Adef bitfield SEL < 2: 0>; 832239SN/A 842029SN/A// Interrupts 852029SN/Adef bitfield SC < 5: 5>; 862025SN/A 872029SN/A// Branch format 882029SN/Adef bitfield OFFSET <15: 0>; // displacement 892025SN/A 902124SN/A// Jmp format 912043SN/Adef bitfield JMPTARG <25: 0>; 922135SN/Adef bitfield HINT <10: 6>; 932025SN/A 942043SN/Adef bitfield SYSCALLCODE <25: 6>; 952043SN/Adef bitfield TRAPCODE <15:13>; 962025SN/A 972686Sksewell@umich.edu// EXT/INS instructions 982686Sksewell@umich.edudef bitfield MSB <15:11>; 992686Sksewell@umich.edudef bitfield LSB <10: 6>; 1002686Sksewell@umich.edu 1012025SN/A// M5 instructions 1022025SN/Adef bitfield M5FUNC <7:0>; 103