bitfields.isa revision 7103
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;
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;
586743Ssaidi@eecs.umich.edudef bitfield OPCODE_20	   opcode20;
596251Sgblack@eecs.umich.edudef bitfield OPCODE_19	   opcode19;
606741Sgblack@eecs.umich.edudef bitfield OPCODE_18	   opcode18;
616251Sgblack@eecs.umich.edudef bitfield OPCODE_15_12  opcode15_12;
626251Sgblack@eecs.umich.edudef bitfield OPCODE_15	   opcode15;
636268Sgblack@eecs.umich.edudef bitfield MISC_OPCODE   miscOpcode;
646759SAli.Saidi@ARM.comdef bitfield OPC2          opc2; 
656251Sgblack@eecs.umich.edudef bitfield OPCODE_7      opcode7;
666251Sgblack@eecs.umich.edudef bitfield OPCODE_4      opcode4;
676019Shines@cs.fsu.edu
686267Sgblack@eecs.umich.edudef bitfield IS_MISC       isMisc;
696267Sgblack@eecs.umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour;
706267Sgblack@eecs.umich.edu
717101Sgblack@eecs.umich.edudef bitfield THUMB         thumb;
727101Sgblack@eecs.umich.edudef bitfield BIGTHUMB      bigThumb;
737101Sgblack@eecs.umich.edu
746019Shines@cs.fsu.edu// Other
756251Sgblack@eecs.umich.edudef bitfield COND_CODE     condCode;
766251Sgblack@eecs.umich.edudef bitfield S_FIELD       sField;
776251Sgblack@eecs.umich.edudef bitfield RN            rn;
786251Sgblack@eecs.umich.edudef bitfield RD            rd;
796251Sgblack@eecs.umich.edudef bitfield SHIFT_SIZE    shiftSize;
806251Sgblack@eecs.umich.edudef bitfield SHIFT         shift;
816251Sgblack@eecs.umich.edudef bitfield RM            rm;
826019Shines@cs.fsu.edu
836251Sgblack@eecs.umich.edudef bitfield RS            rs;
846019Shines@cs.fsu.edu
856275Sgblack@eecs.umich.edudef bitfield PUSWL         puswl;
866275Sgblack@eecs.umich.edudef bitfield PREPOST       puswl.prepost;
876275Sgblack@eecs.umich.edudef bitfield UP               puswl.up;
886275Sgblack@eecs.umich.edudef bitfield PSRUSER       puswl.psruser;
896275Sgblack@eecs.umich.edudef bitfield WRITEBACK     puswl.writeback;
906251Sgblack@eecs.umich.edudef bitfield LOADOP        puswl.loadOp;
916019Shines@cs.fsu.edu
926275Sgblack@eecs.umich.edudef bitfield PUBWL         pubwl;
936019Shines@cs.fsu.edu
946275Sgblack@eecs.umich.edudef bitfield IMM           imm;
956019Shines@cs.fsu.edu
966251Sgblack@eecs.umich.edudef bitfield IMMED_11_0    immed11_0;
976019Shines@cs.fsu.edu
986251Sgblack@eecs.umich.edudef bitfield IMMED_HI_11_8 immedHi11_8;
996251Sgblack@eecs.umich.edudef bitfield IMMED_LO_3_0  immedLo3_0;
1006019Shines@cs.fsu.edu
1016251Sgblack@eecs.umich.edudef bitfield IMMED_23_0    immed23_0;
1026019Shines@cs.fsu.edu
1036251Sgblack@eecs.umich.edudef bitfield CPNUM	   cpNum;
1046019Shines@cs.fsu.edu// Note that FP Regs are only 3 bits
1056251Sgblack@eecs.umich.edudef bitfield FN		   fn;
1066251Sgblack@eecs.umich.edudef bitfield FD		   fd;
1076251Sgblack@eecs.umich.edudef bitfield FPREGIMM	   fpRegImm;
1086019Shines@cs.fsu.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1096019Shines@cs.fsu.edu// float_regfile.hh
1106251Sgblack@eecs.umich.edudef bitfield FM		   fm;
1116251Sgblack@eecs.umich.edudef bitfield FPIMM	   fpImm;
1126251Sgblack@eecs.umich.edudef bitfield PUNWL	   punwl;
1136019Shines@cs.fsu.edu
1146019Shines@cs.fsu.edu// M5 instructions
1156251Sgblack@eecs.umich.edudef bitfield M5FUNC        m5Func;
1166019Shines@cs.fsu.edu
1177103Sgblack@eecs.umich.edu// Thumb bitfields
1187103Sgblack@eecs.umich.edudef bitfield TOPCODE_15_13  topcode15_13;
1197103Sgblack@eecs.umich.edudef bitfield TOPCODE_13_11  topcode13_11;
1207103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_11  topcode12_11;
1217103Sgblack@eecs.umich.edudef bitfield TOPCODE_12_10  topcode12_10;
1227103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_9   topcode11_9;
1237103Sgblack@eecs.umich.edudef bitfield TOPCODE_11_8   topcode11_8;
1247103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_9   topcode10_9;
1257103Sgblack@eecs.umich.edudef bitfield TOPCODE_10_8   topcode10_8;
1267103Sgblack@eecs.umich.edudef bitfield TOPCODE_9_6    topcode9_6;
1277103Sgblack@eecs.umich.edudef bitfield TOPCODE_7      topcode7;
1287103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_6    topcode7_6;
1297103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_5    topcode7_5;
1307103Sgblack@eecs.umich.edudef bitfield TOPCODE_7_4    topcode7_4;
1317103Sgblack@eecs.umich.edudef bitfield TOPCODE_3_0    topcode3_0;
132