bitfields.isa revision 7103
12139SN/A// -*- mode:c++ -*- 22139SN/A 32139SN/A// Copyright (c) 2010 ARM Limited 42139SN/A// All rights reserved 52139SN/A// 62139SN/A// The license below extends only to copyright in the software and shall 72139SN/A// not be construed as granting a license to any other intellectual 82139SN/A// property including but not limited to intellectual property relating 92139SN/A// to a hardware implementation of the functionality of the software 102139SN/A// licensed hereunder. You may use the software subject to the license 112139SN/A// terms below provided that you ensure that this notice is replicated 122139SN/A// unmodified and in its entirety in all distributions of the software, 132139SN/A// modified or unmodified, in source code or in binary form. 142139SN/A// 152139SN/A// Copyright (c) 2007-2008 The Florida State University 162139SN/A// All rights reserved. 172139SN/A// 182139SN/A// Redistribution and use in source and binary forms, with or without 192139SN/A// modification, are permitted provided that the following conditions are 202139SN/A// met: redistributions of source code must retain the above copyright 212139SN/A// notice, this list of conditions and the following disclaimer; 222139SN/A// redistributions in binary form must reproduce the above copyright 232139SN/A// notice, this list of conditions and the following disclaimer in the 242139SN/A// documentation and/or other materials provided with the distribution; 252139SN/A// neither the name of the copyright holders nor the names of its 262139SN/A// contributors may be used to endorse or promote products derived from 272139SN/A// this software without specific prior written permission. 282665Ssaidi@eecs.umich.edu// 292665Ssaidi@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 302139SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 314202Sbinkertn@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 322139SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 334202Sbinkertn@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 342152SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 352152SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 362139SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 372139SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 382139SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 392139SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 402139SN/A// 412152SN/A// Authors: Stephen Hines 422152SN/A 432139SN/A//////////////////////////////////////////////////////////////////// 442139SN/A// 452139SN/A// Bitfield definitions. 464781Snate@binkert.org// 474781Snate@binkert.org 484781Snate@binkert.org// Opcode fields 494781Snate@binkert.orgdef bitfield ENCODING encoding; 504781Snate@binkert.orgdef bitfield OPCODE opcode; 513170Sstever@eecs.umich.edudef bitfield MEDIA_OPCODE mediaOpcode; 523806Ssaidi@eecs.umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2; 534781Snate@binkert.orgdef bitfield USEIMM useImm; 544781Snate@binkert.orgdef bitfield OPCODE_24 opcode24; 554781Snate@binkert.orgdef bitfield OPCODE_23_20 opcode23_20; 564781Snate@binkert.orgdef bitfield OPCODE_23_21 opcode23_21; 574781Snate@binkert.orgdef bitfield OPCODE_22 opcode22; 584781Snate@binkert.orgdef bitfield OPCODE_20 opcode20; 594781Snate@binkert.orgdef bitfield OPCODE_19 opcode19; 604781Snate@binkert.orgdef bitfield OPCODE_18 opcode18; 614781Snate@binkert.orgdef bitfield OPCODE_15_12 opcode15_12; 624781Snate@binkert.orgdef bitfield OPCODE_15 opcode15; 632139SN/Adef bitfield MISC_OPCODE miscOpcode; 642139SN/Adef bitfield OPC2 opc2; 653546Sgblack@eecs.umich.edudef bitfield OPCODE_7 opcode7; 664202Sbinkertn@umich.edudef bitfield OPCODE_4 opcode4; 672152SN/A 682152SN/Adef bitfield IS_MISC isMisc; 692152SN/Adef bitfield SEVEN_AND_FOUR sevenAndFour; 702152SN/A 712152SN/Adef bitfield THUMB thumb; 722152SN/Adef bitfield BIGTHUMB bigThumb; 732152SN/A 742152SN/A// Other 752152SN/Adef bitfield COND_CODE condCode; 762152SN/Adef bitfield S_FIELD sField; 772152SN/Adef bitfield RN rn; 782152SN/Adef bitfield RD rd; 792504SN/Adef bitfield SHIFT_SIZE shiftSize; 802504SN/Adef bitfield SHIFT shift; 812504SN/Adef bitfield RM rm; 822504SN/A 832152SN/Adef bitfield RS rs; 842504SN/A 852152SN/Adef bitfield PUSWL puswl; 862152SN/Adef bitfield PREPOST puswl.prepost; 872152SN/Adef bitfield UP puswl.up; 882152SN/Adef bitfield PSRUSER puswl.psruser; 892152SN/Adef bitfield WRITEBACK puswl.writeback; 902152SN/Adef bitfield LOADOP puswl.loadOp; 912152SN/A 922152SN/Adef bitfield PUBWL pubwl; 932632Sstever@eecs.umich.edu 942155SN/Adef bitfield IMM imm; 952155SN/A 962155SN/Adef bitfield IMMED_11_0 immed11_0; 972155SN/A 982155SN/Adef bitfield IMMED_HI_11_8 immedHi11_8; 992155SN/Adef bitfield IMMED_LO_3_0 immedLo3_0; 1004202Sbinkertn@umich.edu 1012155SN/Adef bitfield IMMED_23_0 immed23_0; 1022155SN/A 1032155SN/Adef bitfield CPNUM cpNum; 1042152SN/A// Note that FP Regs are only 3 bits 1052766Sktlim@umich.edudef bitfield FN fn; 1062766Sktlim@umich.edudef bitfield FD fd; 1072766Sktlim@umich.edudef bitfield FPREGIMM fpRegImm; 1082766Sktlim@umich.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in 1092766Sktlim@umich.edu// float_regfile.hh 1102152SN/Adef bitfield FM fm; 1112152SN/Adef bitfield FPIMM fpImm; 1122152SN/Adef bitfield PUNWL punwl; 1132155SN/A 1142152SN/A// M5 instructions 1152152SN/Adef bitfield M5FUNC m5Func; 1162718Sstever@eecs.umich.edu 1172921Sktlim@umich.edu// Thumb bitfields 1182921Sktlim@umich.edudef bitfield TOPCODE_15_13 topcode15_13; 1192921Sktlim@umich.edudef bitfield TOPCODE_13_11 topcode13_11; 1202921Sktlim@umich.edudef bitfield TOPCODE_12_11 topcode12_11; 1212921Sktlim@umich.edudef bitfield TOPCODE_12_10 topcode12_10; 1222921Sktlim@umich.edudef bitfield TOPCODE_11_9 topcode11_9; 1232921Sktlim@umich.edudef bitfield TOPCODE_11_8 topcode11_8; 1242921Sktlim@umich.edudef bitfield TOPCODE_10_9 topcode10_9; 1252921Sktlim@umich.edudef bitfield TOPCODE_10_8 topcode10_8; 1262152SN/Adef bitfield TOPCODE_9_6 topcode9_6; 1272152SN/Adef bitfield TOPCODE_7 topcode7; 128def bitfield TOPCODE_7_6 topcode7_6; 129def bitfield TOPCODE_7_5 topcode7_5; 130def bitfield TOPCODE_7_4 topcode7_4; 131def bitfield TOPCODE_3_0 topcode3_0; 132