bitfields.isa revision 10611
16019Shines@cs.fsu.edu// -*- mode:c++ -*-
26019Shines@cs.fsu.edu
310037SARM gem5 Developers// Copyright (c) 2010, 2011 ARM Limited
47101Sgblack@eecs.umich.edu// All rights reserved
57101Sgblack@eecs.umich.edu//
67101Sgblack@eecs.umich.edu// The license below extends only to copyright in the software and shall
77101Sgblack@eecs.umich.edu// not be construed as granting a license to any other intellectual
87101Sgblack@eecs.umich.edu// property including but not limited to intellectual property relating
97101Sgblack@eecs.umich.edu// to a hardware implementation of the functionality of the software
107101Sgblack@eecs.umich.edu// licensed hereunder.  You may use the software subject to the license
117101Sgblack@eecs.umich.edu// terms below provided that you ensure that this notice is replicated
127101Sgblack@eecs.umich.edu// unmodified and in its entirety in all distributions of the software,
137101Sgblack@eecs.umich.edu// modified or unmodified, in source code or in binary form.
147101Sgblack@eecs.umich.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
376019Shines@cs.fsu.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
386019Shines@cs.fsu.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
396019Shines@cs.fsu.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
406019Shines@cs.fsu.edu//
416019Shines@cs.fsu.edu// Authors: Stephen Hines
426019Shines@cs.fsu.edu
436019Shines@cs.fsu.edu////////////////////////////////////////////////////////////////////
446019Shines@cs.fsu.edu//
456019Shines@cs.fsu.edu// Bitfield definitions.
466019Shines@cs.fsu.edu//
476019Shines@cs.fsu.edu
486019Shines@cs.fsu.edu// Opcode fields
4910611SAndreas.Sandberg@ARM.comdef bitfield DECODERFAULT  decoderFault;
5010611SAndreas.Sandberg@ARM.com
516268Sgblack@eecs.umich.edudef bitfield ENCODING      encoding;
526251Sgblack@eecs.umich.edudef bitfield OPCODE        opcode;
536269Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE  mediaOpcode;
546269Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2;
556749Sgblack@eecs.umich.edudef bitfield USEIMM        useImm;
567105Sgblack@eecs.umich.edudef bitfield OPCODE_24     opcode24;
577161Sgblack@eecs.umich.edudef bitfield OPCODE_24_23  opcode24_23;
586251Sgblack@eecs.umich.edudef bitfield OPCODE_23_20  opcode23_20;
596251Sgblack@eecs.umich.edudef bitfield OPCODE_23_21  opcode23_21;
606251Sgblack@eecs.umich.edudef bitfield OPCODE_22     opcode22;
617105Sgblack@eecs.umich.edudef bitfield OPCODE_20     opcode20;
627105Sgblack@eecs.umich.edudef bitfield OPCODE_19_16  opcode19_16;
637105Sgblack@eecs.umich.edudef bitfield OPCODE_19     opcode19;
647105Sgblack@eecs.umich.edudef bitfield OPCODE_18     opcode18;
656251Sgblack@eecs.umich.edudef bitfield OPCODE_15_12  opcode15_12;
667105Sgblack@eecs.umich.edudef bitfield OPCODE_15     opcode15;
676268Sgblack@eecs.umich.edudef bitfield MISC_OPCODE   miscOpcode;
686759SAli.Saidi@ARM.comdef bitfield OPC2          opc2; 
696251Sgblack@eecs.umich.edudef bitfield OPCODE_7      opcode7;
707105Sgblack@eecs.umich.edudef bitfield OPCODE_6      opcode6;
716251Sgblack@eecs.umich.edudef bitfield OPCODE_4      opcode4;
726019Shines@cs.fsu.edu
736267Sgblack@eecs.umich.edudef bitfield IS_MISC       isMisc;
746267Sgblack@eecs.umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour;
756267Sgblack@eecs.umich.edu
767101Sgblack@eecs.umich.edudef bitfield THUMB         thumb;
777101Sgblack@eecs.umich.edudef bitfield BIGTHUMB      bigThumb;
7810037SARM gem5 Developersdef bitfield AARCH64       aarch64;
797101Sgblack@eecs.umich.edu
806019Shines@cs.fsu.edu// Other
816251Sgblack@eecs.umich.edudef bitfield COND_CODE     condCode;
826251Sgblack@eecs.umich.edudef bitfield S_FIELD       sField;
836251Sgblack@eecs.umich.edudef bitfield RN            rn;
846251Sgblack@eecs.umich.edudef bitfield RD            rd;
857121Sgblack@eecs.umich.edudef bitfield RT            rt;
866251Sgblack@eecs.umich.edudef bitfield SHIFT_SIZE    shiftSize;
876251Sgblack@eecs.umich.edudef bitfield SHIFT         shift;
886251Sgblack@eecs.umich.edudef bitfield RM            rm;
896019Shines@cs.fsu.edu
906251Sgblack@eecs.umich.edudef bitfield RS            rs;
916019Shines@cs.fsu.edu
926275Sgblack@eecs.umich.edudef bitfield PUSWL         puswl;
936275Sgblack@eecs.umich.edudef bitfield PREPOST       puswl.prepost;
946275Sgblack@eecs.umich.edudef bitfield UP               puswl.up;
956275Sgblack@eecs.umich.edudef bitfield PSRUSER       puswl.psruser;
966275Sgblack@eecs.umich.edudef bitfield WRITEBACK     puswl.writeback;
976251Sgblack@eecs.umich.edudef bitfield LOADOP        puswl.loadOp;
986019Shines@cs.fsu.edu
996275Sgblack@eecs.umich.edudef bitfield PUBWL         pubwl;
1006019Shines@cs.fsu.edu
1016275Sgblack@eecs.umich.edudef bitfield IMM           imm;
1026019Shines@cs.fsu.edu
1036251Sgblack@eecs.umich.edudef bitfield IMMED_11_0    immed11_0;
1047121Sgblack@eecs.umich.edudef bitfield IMMED_7_0     immed7_0;
1056019Shines@cs.fsu.edu
1066251Sgblack@eecs.umich.edudef bitfield IMMED_HI_11_8 immedHi11_8;
1076251Sgblack@eecs.umich.edudef bitfield IMMED_LO_3_0  immedLo3_0;
1086019Shines@cs.fsu.edu
1096251Sgblack@eecs.umich.edudef bitfield IMMED_23_0    immed23_0;
1106019Shines@cs.fsu.edu
1117105Sgblack@eecs.umich.edudef bitfield CPNUM         cpNum;
1126019Shines@cs.fsu.edu// Note that FP Regs are only 3 bits
1137105Sgblack@eecs.umich.edudef bitfield FN            fn;
1147105Sgblack@eecs.umich.edudef bitfield FD            fd;
1157105Sgblack@eecs.umich.edudef bitfield FPREGIMM      fpRegImm;
1166019Shines@cs.fsu.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1176019Shines@cs.fsu.edu// float_regfile.hh
1187105Sgblack@eecs.umich.edudef bitfield FM            fm;
1197105Sgblack@eecs.umich.edudef bitfield FPIMM         fpImm;
1207105Sgblack@eecs.umich.edudef bitfield PUNWL         punwl;
1216019Shines@cs.fsu.edu
1226019Shines@cs.fsu.edu// M5 instructions
1236251Sgblack@eecs.umich.edudef bitfield M5FUNC        m5Func;
1246019Shines@cs.fsu.edu
1257106Sgblack@eecs.umich.edu// 16 bit thumb bitfields
1267103Sgblack@eecs.umich.edudef bitfield TOPCODE_15_13  topcode15_13;
1277103Sgblack@eecs.umich.edudef bitfield TOPCODE_13_11  topcode13_11;
1287103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_11  topcode12_11;
1297103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_10  topcode12_10;
1307103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_9   topcode11_9;
1317103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_8   topcode11_8;
1327103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_9   topcode10_9;
1337103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_8   topcode10_8;
1347103Sgblack@eecs.umich.edudef bitfield TOPCODE_9_6    topcode9_6;
1357103Sgblack@eecs.umich.edudef bitfield TOPCODE_7      topcode7;
1367103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_6    topcode7_6;
1377103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_5    topcode7_5;
1387103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_4    topcode7_4;
1397103Sgblack@eecs.umich.edudef bitfield TOPCODE_3_0    topcode3_0;
1407106Sgblack@eecs.umich.edu
1417106Sgblack@eecs.umich.edu// 32 bit thumb bitfields
1427106Sgblack@eecs.umich.edudef bitfield HTOPCODE_12_11 htopcode12_11;
1437106Sgblack@eecs.umich.edudef bitfield HTOPCODE_10_9  htopcode10_9;
1447106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9     htopcode9;
1457106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_8   htopcode9_8;
1467106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_5   htopcode9_5;
1477106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_4   htopcode9_4;
1487106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8     htopcode8;
1497106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_7   htopcode8_7;
1507106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_6   htopcode8_6;
1517106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_5   htopcode8_5;
1527113Sgblack@eecs.umich.edudef bitfield HTOPCODE_7     htopcode7;
1537116Sgblack@eecs.umich.edudef bitfield HTOPCODE_7_5   htopcode7_5;
1547245Sgblack@eecs.umich.edudef bitfield HTOPCODE_6     htopcode6;
1557106Sgblack@eecs.umich.edudef bitfield HTOPCODE_6_5   htopcode6_5;
1567106Sgblack@eecs.umich.edudef bitfield HTOPCODE_5_4   htopcode5_4;
1577106Sgblack@eecs.umich.edudef bitfield HTOPCODE_4     htopcode4;
1587106Sgblack@eecs.umich.edu
1597106Sgblack@eecs.umich.edudef bitfield HTRN           htrn;
1607106Sgblack@eecs.umich.edudef bitfield HTS            hts;
1617106Sgblack@eecs.umich.edu
1627106Sgblack@eecs.umich.edudef bitfield LTOPCODE_15    ltopcode15;
1637113Sgblack@eecs.umich.edudef bitfield LTOPCODE_11_8  ltopcode11_8;
1647113Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_6   ltopcode7_6;
1657106Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_4   ltopcode7_4;
1667106Sgblack@eecs.umich.edudef bitfield LTOPCODE_4     ltopcode4;
1677106Sgblack@eecs.umich.edu
1687106Sgblack@eecs.umich.edudef bitfield LTRD           ltrd;
1697106Sgblack@eecs.umich.edudef bitfield LTCOPROC       ltcoproc;
170