bitfields.isa revision 7113
16019Shines@cs.fsu.edu// -*- mode:c++ -*-
26019Shines@cs.fsu.edu
37101Sgblack@eecs.umich.edu// Copyright (c) 2010 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
496268Sgblack@eecs.umich.edudef bitfield ENCODING      encoding;
506251Sgblack@eecs.umich.edudef bitfield OPCODE        opcode;
516269Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE  mediaOpcode;
526269Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2;
536749Sgblack@eecs.umich.edudef bitfield USEIMM        useImm;
547105Sgblack@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;
587105Sgblack@eecs.umich.edudef bitfield OPCODE_20     opcode20;
597105Sgblack@eecs.umich.edudef bitfield OPCODE_19_16  opcode19_16;
607105Sgblack@eecs.umich.edudef bitfield OPCODE_19     opcode19;
617105Sgblack@eecs.umich.edudef bitfield OPCODE_18     opcode18;
626251Sgblack@eecs.umich.edudef bitfield OPCODE_15_12  opcode15_12;
637105Sgblack@eecs.umich.edudef bitfield OPCODE_15     opcode15;
646268Sgblack@eecs.umich.edudef bitfield MISC_OPCODE   miscOpcode;
656759SAli.Saidi@ARM.comdef bitfield OPC2          opc2; 
666251Sgblack@eecs.umich.edudef bitfield OPCODE_7      opcode7;
677105Sgblack@eecs.umich.edudef bitfield OPCODE_6      opcode6;
686251Sgblack@eecs.umich.edudef bitfield OPCODE_4      opcode4;
696019Shines@cs.fsu.edu
706267Sgblack@eecs.umich.edudef bitfield IS_MISC       isMisc;
716267Sgblack@eecs.umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour;
726267Sgblack@eecs.umich.edu
737101Sgblack@eecs.umich.edudef bitfield THUMB         thumb;
747101Sgblack@eecs.umich.edudef bitfield BIGTHUMB      bigThumb;
757101Sgblack@eecs.umich.edu
766019Shines@cs.fsu.edu// Other
776251Sgblack@eecs.umich.edudef bitfield COND_CODE     condCode;
786251Sgblack@eecs.umich.edudef bitfield S_FIELD       sField;
796251Sgblack@eecs.umich.edudef bitfield RN            rn;
806251Sgblack@eecs.umich.edudef bitfield RD            rd;
816251Sgblack@eecs.umich.edudef bitfield SHIFT_SIZE    shiftSize;
826251Sgblack@eecs.umich.edudef bitfield SHIFT         shift;
836251Sgblack@eecs.umich.edudef bitfield RM            rm;
846019Shines@cs.fsu.edu
856251Sgblack@eecs.umich.edudef bitfield RS            rs;
866019Shines@cs.fsu.edu
876275Sgblack@eecs.umich.edudef bitfield PUSWL         puswl;
886275Sgblack@eecs.umich.edudef bitfield PREPOST       puswl.prepost;
896275Sgblack@eecs.umich.edudef bitfield UP               puswl.up;
906275Sgblack@eecs.umich.edudef bitfield PSRUSER       puswl.psruser;
916275Sgblack@eecs.umich.edudef bitfield WRITEBACK     puswl.writeback;
926251Sgblack@eecs.umich.edudef bitfield LOADOP        puswl.loadOp;
936019Shines@cs.fsu.edu
946275Sgblack@eecs.umich.edudef bitfield PUBWL         pubwl;
956019Shines@cs.fsu.edu
966275Sgblack@eecs.umich.edudef bitfield IMM           imm;
976019Shines@cs.fsu.edu
986251Sgblack@eecs.umich.edudef bitfield IMMED_11_0    immed11_0;
996019Shines@cs.fsu.edu
1006251Sgblack@eecs.umich.edudef bitfield IMMED_HI_11_8 immedHi11_8;
1016251Sgblack@eecs.umich.edudef bitfield IMMED_LO_3_0  immedLo3_0;
1026019Shines@cs.fsu.edu
1036251Sgblack@eecs.umich.edudef bitfield IMMED_23_0    immed23_0;
1046019Shines@cs.fsu.edu
1057105Sgblack@eecs.umich.edudef bitfield CPNUM         cpNum;
1066019Shines@cs.fsu.edu// Note that FP Regs are only 3 bits
1077105Sgblack@eecs.umich.edudef bitfield FN            fn;
1087105Sgblack@eecs.umich.edudef bitfield FD            fd;
1097105Sgblack@eecs.umich.edudef bitfield FPREGIMM      fpRegImm;
1106019Shines@cs.fsu.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1116019Shines@cs.fsu.edu// float_regfile.hh
1127105Sgblack@eecs.umich.edudef bitfield FM            fm;
1137105Sgblack@eecs.umich.edudef bitfield FPIMM         fpImm;
1147105Sgblack@eecs.umich.edudef bitfield PUNWL         punwl;
1156019Shines@cs.fsu.edu
1166019Shines@cs.fsu.edu// M5 instructions
1176251Sgblack@eecs.umich.edudef bitfield M5FUNC        m5Func;
1186019Shines@cs.fsu.edu
1197106Sgblack@eecs.umich.edu// 16 bit thumb bitfields
1207103Sgblack@eecs.umich.edudef bitfield TOPCODE_15_13  topcode15_13;
1217103Sgblack@eecs.umich.edudef bitfield TOPCODE_13_11  topcode13_11;
1227103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_11  topcode12_11;
1237103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_10  topcode12_10;
1247103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_9   topcode11_9;
1257103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_8   topcode11_8;
1267103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_9   topcode10_9;
1277103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_8   topcode10_8;
1287103Sgblack@eecs.umich.edudef bitfield TOPCODE_9_6    topcode9_6;
1297103Sgblack@eecs.umich.edudef bitfield TOPCODE_7      topcode7;
1307103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_6    topcode7_6;
1317103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_5    topcode7_5;
1327103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_4    topcode7_4;
1337103Sgblack@eecs.umich.edudef bitfield TOPCODE_3_0    topcode3_0;
1347106Sgblack@eecs.umich.edu
1357106Sgblack@eecs.umich.edu// 32 bit thumb bitfields
1367106Sgblack@eecs.umich.edudef bitfield HTOPCODE_12_11 htopcode12_11;
1377106Sgblack@eecs.umich.edudef bitfield HTOPCODE_10_9  htopcode10_9;
1387106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9     htopcode9;
1397106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_8   htopcode9_8;
1407106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_5   htopcode9_5;
1417106Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_4   htopcode9_4;
1427106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8     htopcode8;
1437106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_7   htopcode8_7;
1447106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_6   htopcode8_6;
1457106Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_5   htopcode8_5;
1467113Sgblack@eecs.umich.edudef bitfield HTOPCODE_7     htopcode7;
1477106Sgblack@eecs.umich.edudef bitfield HTOPCODE_6_5   htopcode6_5;
1487106Sgblack@eecs.umich.edudef bitfield HTOPCODE_5_4   htopcode5_4;
1497106Sgblack@eecs.umich.edudef bitfield HTOPCODE_4     htopcode4;
1507106Sgblack@eecs.umich.edu
1517106Sgblack@eecs.umich.edudef bitfield HTRN           htrn;
1527106Sgblack@eecs.umich.edudef bitfield HTS            hts;
1537106Sgblack@eecs.umich.edu
1547106Sgblack@eecs.umich.edudef bitfield LTOPCODE_15    ltopcode15;
1557113Sgblack@eecs.umich.edudef bitfield LTOPCODE_11_8  ltopcode11_8;
1567113Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_6   ltopcode7_6;
1577106Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_4   ltopcode7_4;
1587106Sgblack@eecs.umich.edudef bitfield LTOPCODE_4     ltopcode4;
1597106Sgblack@eecs.umich.edu
1607106Sgblack@eecs.umich.edudef bitfield LTRD           ltrd;
1617106Sgblack@eecs.umich.edudef bitfield LTCOPROC       ltcoproc;
162