bitfields.isa revision 2754
1// -*- mode:c++ -*- 2 3// Copyright (c) 2006 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright 9// notice, this list of conditions and the following disclaimer; 10// redistributions in binary form must reproduce the above copyright 11// notice, this list of conditions and the following disclaimer in the 12// documentation and/or other materials provided with the distribution; 13// neither the name of the copyright holders nor the names of its 14// contributors may be used to endorse or promote products derived from 15// this software without specific prior written permission. 16// 17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28// 29// Authors: Korey Sewell 30 31//////////////////////////////////////////////////////////////////// 32// 33// Bitfield definitions. 34// 35 36def bitfield OPCODE <31:26>; 37def bitfield OPCODE_HI <31:29>; 38def bitfield OPCODE_LO <28:26>; 39 40def bitfield REGIMM <20:16>; 41def bitfield REGIMM_HI <20:19>; 42def bitfield REGIMM_LO <18:16>; 43 44def bitfield FUNCTION < 5: 0>; 45def bitfield FUNCTION_HI < 5: 3>; 46def bitfield FUNCTION_LO < 2: 0>; 47 48def bitfield RS <25:21>; 49def bitfield RS_MSB <25:25>; 50def bitfield RS_HI <25:24>; 51def bitfield RS_LO <23:21>; 52def bitfield RS_SRL <25:22>; 53def bitfield RS_RT <25:16>; 54def bitfield RT <20:16>; 55def bitfield RT_HI <20:19>; 56def bitfield RT_LO <18:16>; 57def bitfield RT_RD <20:11>; 58def bitfield RD <15:11>; 59 60def bitfield INTIMM <15: 0>; 61 62// Floating-point operate format 63def bitfield FMT <25:21>; 64def bitfield FR <25:21>; 65def bitfield FT <20:16>; 66def bitfield FS <15:11>; 67def bitfield FD <10:6>; 68 69def bitfield ND <17:17>; 70def bitfield TF <16:16>; 71def bitfield MOVCI <16:16>; 72def bitfield MOVCF <16:16>; 73def bitfield SRL <21:21>; 74def bitfield SRLV < 6: 6>; 75def bitfield SA <10: 6>; 76 77// Floating Point Condition Codes 78def bitfield CC <10:8>; 79def bitfield BRANCH_CC <20:18>; 80 81// CP0 Register Select 82def bitfield SEL < 2: 0>; 83 84// Interrupts 85def bitfield SC < 5: 5>; 86 87// Branch format 88def bitfield OFFSET <15: 0>; // displacement 89 90// Jmp format 91def bitfield JMPTARG <25: 0>; 92def bitfield HINT <10: 6>; 93 94def bitfield SYSCALLCODE <25: 6>; 95def bitfield TRAPCODE <15:13>; 96 97// EXT/INS instructions 98def bitfield MSB <15:11>; 99def bitfield LSB <10: 6>; 100 101// M5 instructions 102def bitfield M5FUNC <7:0>; 103