bitfields.isa revision 6269
1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 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: Stephen Hines 30 31//////////////////////////////////////////////////////////////////// 32// 33// Bitfield definitions. 34// 35 36// Opcode fields 37def bitfield ENCODING encoding; 38def bitfield OPCODE opcode; 39def bitfield OPCODE_24_23 opcode24_23; 40def bitfield MEDIA_OPCODE mediaOpcode; 41def bitfield MEDIA_OPCODE2 mediaOpcode2; 42def bitfield OPCODE_24 opcode24; 43def bitfield OPCODE_23_20 opcode23_20; 44def bitfield OPCODE_23_21 opcode23_21; 45def bitfield OPCODE_23 opcode23; 46def bitfield OPCODE_22_8 opcode22_8; 47def bitfield OPCODE_22_21 opcode22_21; 48def bitfield OPCODE_22 opcode22; 49def bitfield OPCODE_21_20 opcode21_20; 50def bitfield OPCODE_20 opcode20; 51def bitfield OPCODE_19_18 opcode19_18; 52def bitfield OPCODE_19 opcode19; 53def bitfield OPCODE_15_12 opcode15_12; 54def bitfield OPCODE_15 opcode15; 55def bitfield OPCODE_9 opcode9; 56def bitfield MISC_OPCODE miscOpcode; 57def bitfield OPCODE_7_5 opcode7_5; 58def bitfield OPCODE_7_6 opcode7_6; 59def bitfield OPCODE_7 opcode7; 60def bitfield OPCODE_6_5 opcode6_5; 61def bitfield OPCODE_6 opcode6; 62def bitfield OPCODE_5 opcode5; 63def bitfield OPCODE_4 opcode4; 64 65def bitfield IS_MISC isMisc; 66def bitfield SEVEN_AND_FOUR sevenAndFour; 67 68// Other 69def bitfield COND_CODE condCode; 70def bitfield S_FIELD sField; 71def bitfield RN rn; 72def bitfield RD rd; 73def bitfield SHIFT_SIZE shiftSize; 74def bitfield SHIFT shift; 75def bitfield RM rm; 76 77def bitfield RS rs; 78 79def bitfield RDUP rdup; 80def bitfield RNDN rddn; 81 82def bitfield RDHI rdhi; 83def bitfield RDLO rdlo; 84 85def bitfield U_FIELD uField; 86 87def bitfield PUSWL puswl; 88def bitfield PREPOST puswl.prepost; 89def bitfield UP puswl.up; 90def bitfield PSRUSER puswl.psruser; 91def bitfield WRITEBACK puswl.writeback; 92def bitfield LOADOP puswl.loadOp; 93 94def bitfield PUBWL pubwl; 95def bitfield PUIWL puiwl; 96def bitfield BYTEACCESS byteAccess; 97 98def bitfield LUAS luas; 99 100def bitfield IMM imm; 101def bitfield IMMED_7_4 immed7_4; 102def bitfield IMMED_3_0 immed3_0; 103 104def bitfield F_MSR msr.f; 105def bitfield S_MSR msr.s; 106def bitfield X_MSR msr.x; 107def bitfield C_MSR msr.c; 108 109def bitfield Y_6 y; 110def bitfield X_5 x; 111 112def bitfield IMMED_15_4 immed15_4; 113 114def bitfield W_FIELD wField; 115 116def bitfield ROTATE rotate; 117def bitfield IMMED_7_0 immed7_0; 118 119def bitfield T_FIELD tField; 120def bitfield IMMED_11_0 immed11_0; 121 122def bitfield IMMED_20_16 immed20_16; 123def bitfield IMMED_19_16 immed19_16; 124 125def bitfield IMMED_HI_11_8 immedHi11_8; 126def bitfield IMMED_LO_3_0 immedLo3_0; 127 128def bitfield ROT rot; 129 130def bitfield R_FIELD rField; 131 132def bitfield CARET caret; 133def bitfield REGLIST regList; 134 135def bitfield OFFSET offset; 136def bitfield COPRO copro; 137def bitfield OP1_7_4 op1_7_4; 138def bitfield CM cm; 139 140def bitfield L_FIELD lField; 141def bitfield CD cd; 142def bitfield OPTION option; 143 144def bitfield OP1_23_20 op1_23_20; 145def bitfield CN cn; 146def bitfield OP2_7_5 op2_7_5; 147 148def bitfield OP1_23_21 op1_23_21; 149 150def bitfield IMMED_23_0 immed23_0; 151def bitfield M_FIELD mField; 152def bitfield A_FIELD aField; 153def bitfield I_FIELD iField; 154def bitfield F_FIELD fField; 155def bitfield MODE mode; 156 157def bitfield A_BLX aBlx; 158 159def bitfield CPNUM cpNum; 160// Note that FP Regs are only 3 bits 161def bitfield FN fn; 162def bitfield FD fd; 163def bitfield FPREGIMM fpRegImm; 164// We can just use 3:0 for FM since the hard-wired FP regs are handled in 165// float_regfile.hh 166def bitfield FM fm; 167def bitfield FPIMM fpImm; 168def bitfield PUNWL punwl; 169 170// M5 instructions 171def bitfield M5FUNC m5Func; 172 173