bitfields.isa revision 7121
16019Shines@cs.fsu.edu// -*- mode:c++ -*- 26019Shines@cs.fsu.edu 36019Shines@cs.fsu.edu// Copyright (c) 2010 ARM Limited 46019Shines@cs.fsu.edu// All rights reserved 56019Shines@cs.fsu.edu// 66019Shines@cs.fsu.edu// The license below extends only to copyright in the software and shall 76019Shines@cs.fsu.edu// not be construed as granting a license to any other intellectual 86019Shines@cs.fsu.edu// property including but not limited to intellectual property relating 96019Shines@cs.fsu.edu// to a hardware implementation of the functionality of the software 106019Shines@cs.fsu.edu// licensed hereunder. You may use the software subject to the license 116019Shines@cs.fsu.edu// terms below provided that you ensure that this notice is replicated 126019Shines@cs.fsu.edu// unmodified and in its entirety in all distributions of the software, 136019Shines@cs.fsu.edu// modified or unmodified, in source code or in binary form. 146019Shines@cs.fsu.edu// 156019Shines@cs.fsu.edu// Copyright (c) 2007-2008 The Florida State University 166019Shines@cs.fsu.edu// All rights reserved. 176019Shines@cs.fsu.edu// 186019Shines@cs.fsu.edu// Redistribution and use in source and binary forms, with or without 196019Shines@cs.fsu.edu// modification, are permitted provided that the following conditions are 206019Shines@cs.fsu.edu// met: redistributions of source code must retain the above copyright 216019Shines@cs.fsu.edu// notice, this list of conditions and the following disclaimer; 226019Shines@cs.fsu.edu// redistributions in binary form must reproduce the above copyright 236019Shines@cs.fsu.edu// notice, this list of conditions and the following disclaimer in the 246019Shines@cs.fsu.edu// documentation and/or other materials provided with the distribution; 256019Shines@cs.fsu.edu// neither the name of the copyright holders nor the names of its 266019Shines@cs.fsu.edu// contributors may be used to endorse or promote products derived from 276019Shines@cs.fsu.edu// this software without specific prior written permission. 286019Shines@cs.fsu.edu// 296019Shines@cs.fsu.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 306019Shines@cs.fsu.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 316019Shines@cs.fsu.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 326019Shines@cs.fsu.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 336019Shines@cs.fsu.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 346019Shines@cs.fsu.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 356019Shines@cs.fsu.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 366019Shines@cs.fsu.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 376251Sgblack@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 386251Sgblack@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 396251Sgblack@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 406251Sgblack@eecs.umich.edu// 416251Sgblack@eecs.umich.edu// Authors: Stephen Hines 426251Sgblack@eecs.umich.edu 436251Sgblack@eecs.umich.edu//////////////////////////////////////////////////////////////////// 446251Sgblack@eecs.umich.edu// 456251Sgblack@eecs.umich.edu// Bitfield definitions. 466251Sgblack@eecs.umich.edu// 476251Sgblack@eecs.umich.edu 486251Sgblack@eecs.umich.edu// Opcode fields 496251Sgblack@eecs.umich.edudef bitfield ENCODING encoding; 506251Sgblack@eecs.umich.edudef bitfield OPCODE opcode; 516251Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE mediaOpcode; 526251Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2; 536251Sgblack@eecs.umich.edudef bitfield USEIMM useImm; 546251Sgblack@eecs.umich.edudef bitfield OPCODE_24 opcode24; 556251Sgblack@eecs.umich.edudef bitfield OPCODE_23_20 opcode23_20; 566251Sgblack@eecs.umich.edudef bitfield OPCODE_23_21 opcode23_21; 576251Sgblack@eecs.umich.edudef bitfield OPCODE_22 opcode22; 586251Sgblack@eecs.umich.edudef bitfield OPCODE_20 opcode20; 596251Sgblack@eecs.umich.edudef bitfield OPCODE_19_16 opcode19_16; 606251Sgblack@eecs.umich.edudef bitfield OPCODE_19 opcode19; 616251Sgblack@eecs.umich.edudef bitfield OPCODE_18 opcode18; 626251Sgblack@eecs.umich.edudef bitfield OPCODE_15_12 opcode15_12; 636019Shines@cs.fsu.edudef bitfield OPCODE_15 opcode15; 646267Sgblack@eecs.umich.edudef bitfield MISC_OPCODE miscOpcode; 656267Sgblack@eecs.umich.edudef bitfield OPC2 opc2; 666267Sgblack@eecs.umich.edudef bitfield OPCODE_7 opcode7; 676019Shines@cs.fsu.edudef bitfield OPCODE_6 opcode6; 686251Sgblack@eecs.umich.edudef bitfield OPCODE_4 opcode4; 696251Sgblack@eecs.umich.edu 706251Sgblack@eecs.umich.edudef bitfield IS_MISC isMisc; 716251Sgblack@eecs.umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour; 726251Sgblack@eecs.umich.edu 736251Sgblack@eecs.umich.edudef bitfield THUMB thumb; 746251Sgblack@eecs.umich.edudef bitfield BIGTHUMB bigThumb; 756019Shines@cs.fsu.edu 766251Sgblack@eecs.umich.edu// Other 776019Shines@cs.fsu.edudef bitfield COND_CODE condCode; 786251Sgblack@eecs.umich.edudef bitfield S_FIELD sField; 796251Sgblack@eecs.umich.edudef bitfield RN rn; 806019Shines@cs.fsu.edudef bitfield RD rd; 816251Sgblack@eecs.umich.edudef bitfield RT rt; 826251Sgblack@eecs.umich.edudef bitfield SHIFT_SIZE shiftSize; 836019Shines@cs.fsu.edudef bitfield SHIFT shift; 846251Sgblack@eecs.umich.edudef bitfield RM rm; 856019Shines@cs.fsu.edu 866251Sgblack@eecs.umich.edudef bitfield RS rs; 876251Sgblack@eecs.umich.edu 886251Sgblack@eecs.umich.edudef bitfield PUSWL puswl; 896251Sgblack@eecs.umich.edudef bitfield PREPOST puswl.prepost; 906251Sgblack@eecs.umich.edudef bitfield UP puswl.up; 916251Sgblack@eecs.umich.edudef bitfield PSRUSER puswl.psruser; 926019Shines@cs.fsu.edudef bitfield WRITEBACK puswl.writeback; 936251Sgblack@eecs.umich.edudef bitfield LOADOP puswl.loadOp; 946251Sgblack@eecs.umich.edu 956251Sgblack@eecs.umich.edudef bitfield PUBWL pubwl; 966019Shines@cs.fsu.edu 976251Sgblack@eecs.umich.edudef bitfield IMM imm; 986019Shines@cs.fsu.edu 996251Sgblack@eecs.umich.edudef bitfield IMMED_11_0 immed11_0; 1006251Sgblack@eecs.umich.edudef bitfield IMMED_7_0 immed7_0; 1016251Sgblack@eecs.umich.edu 1026019Shines@cs.fsu.edudef bitfield IMMED_HI_11_8 immedHi11_8; 1036251Sgblack@eecs.umich.edudef bitfield IMMED_LO_3_0 immedLo3_0; 1046251Sgblack@eecs.umich.edu 1056251Sgblack@eecs.umich.edudef bitfield IMMED_23_0 immed23_0; 1066251Sgblack@eecs.umich.edu 1076019Shines@cs.fsu.edudef bitfield CPNUM cpNum; 1086251Sgblack@eecs.umich.edu// Note that FP Regs are only 3 bits 1096251Sgblack@eecs.umich.edudef bitfield FN fn; 1106019Shines@cs.fsu.edudef bitfield FD fd; 1116251Sgblack@eecs.umich.edudef bitfield FPREGIMM fpRegImm; 1126019Shines@cs.fsu.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in 1136251Sgblack@eecs.umich.edu// float_regfile.hh 1146019Shines@cs.fsu.edudef bitfield FM fm; 1156251Sgblack@eecs.umich.edudef bitfield FPIMM fpImm; 1166251Sgblack@eecs.umich.edudef bitfield PUNWL punwl; 1176019Shines@cs.fsu.edu 1186251Sgblack@eecs.umich.edu// M5 instructions 1196251Sgblack@eecs.umich.edudef bitfield M5FUNC m5Func; 1206019Shines@cs.fsu.edu 1216251Sgblack@eecs.umich.edu// 16 bit thumb bitfields 1226251Sgblack@eecs.umich.edudef bitfield TOPCODE_15_13 topcode15_13; 1236019Shines@cs.fsu.edudef bitfield TOPCODE_13_11 topcode13_11; 1246251Sgblack@eecs.umich.edudef bitfield TOPCODE_12_11 topcode12_11; 1256251Sgblack@eecs.umich.edudef bitfield TOPCODE_12_10 topcode12_10; 1266019Shines@cs.fsu.edudef bitfield TOPCODE_11_9 topcode11_9; 1276251Sgblack@eecs.umich.edudef bitfield TOPCODE_11_8 topcode11_8; 1286019Shines@cs.fsu.edudef bitfield TOPCODE_10_9 topcode10_9; 1296251Sgblack@eecs.umich.edudef bitfield TOPCODE_10_8 topcode10_8; 1306019Shines@cs.fsu.edudef bitfield TOPCODE_9_6 topcode9_6; 1316251Sgblack@eecs.umich.edudef bitfield TOPCODE_7 topcode7; 1326251Sgblack@eecs.umich.edudef bitfield TOPCODE_7_6 topcode7_6; 1336019Shines@cs.fsu.edudef bitfield TOPCODE_7_5 topcode7_5; 1346251Sgblack@eecs.umich.edudef bitfield TOPCODE_7_4 topcode7_4; 1356251Sgblack@eecs.umich.edudef bitfield TOPCODE_3_0 topcode3_0; 1366251Sgblack@eecs.umich.edu 1376251Sgblack@eecs.umich.edu// 32 bit thumb bitfields 1386019Shines@cs.fsu.edudef bitfield HTOPCODE_12_11 htopcode12_11; 1396251Sgblack@eecs.umich.edudef bitfield HTOPCODE_10_9 htopcode10_9; 1406251Sgblack@eecs.umich.edudef bitfield HTOPCODE_9 htopcode9; 1416251Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_8 htopcode9_8; 1426019Shines@cs.fsu.edudef bitfield HTOPCODE_9_5 htopcode9_5; 1436251Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_4 htopcode9_4; 1446251Sgblack@eecs.umich.edudef bitfield HTOPCODE_8 htopcode8; 1456251Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_7 htopcode8_7; 1466019Shines@cs.fsu.edudef bitfield HTOPCODE_8_6 htopcode8_6; 1476251Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_5 htopcode8_5; 1486019Shines@cs.fsu.edudef bitfield HTOPCODE_7 htopcode7; 1496251Sgblack@eecs.umich.edudef bitfield HTOPCODE_7_5 htopcode7_5; 1506251Sgblack@eecs.umich.edudef bitfield HTOPCODE_6_5 htopcode6_5; 1516251Sgblack@eecs.umich.edudef bitfield HTOPCODE_5_4 htopcode5_4; 1526251Sgblack@eecs.umich.edudef bitfield HTOPCODE_4 htopcode4; 1536251Sgblack@eecs.umich.edu 1546251Sgblack@eecs.umich.edudef bitfield HTRN htrn; 1556019Shines@cs.fsu.edudef bitfield HTS hts; 1566251Sgblack@eecs.umich.edu 1576019Shines@cs.fsu.edudef bitfield LTOPCODE_15 ltopcode15; 1586251Sgblack@eecs.umich.edudef bitfield LTOPCODE_11_8 ltopcode11_8; 1596019Shines@cs.fsu.edudef bitfield LTOPCODE_7_6 ltopcode7_6; 1606251Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_4 ltopcode7_4; 1616251Sgblack@eecs.umich.edudef bitfield LTOPCODE_4 ltopcode4; 1626251Sgblack@eecs.umich.edu 1636019Shines@cs.fsu.edudef bitfield LTRD ltrd; 1646019Shines@cs.fsu.edudef bitfield LTCOPROC ltcoproc; 1656251Sgblack@eecs.umich.edu