bitfields.isa revision 7103
16285Snate@binkert.org// -*- mode:c++ -*-
26285Snate@binkert.org
36285Snate@binkert.org// Copyright (c) 2010 ARM Limited
46285Snate@binkert.org// All rights reserved
56285Snate@binkert.org//
66285Snate@binkert.org// The license below extends only to copyright in the software and shall
76285Snate@binkert.org// not be construed as granting a license to any other intellectual
86285Snate@binkert.org// property including but not limited to intellectual property relating
96285Snate@binkert.org// to a hardware implementation of the functionality of the software
106285Snate@binkert.org// licensed hereunder.  You may use the software subject to the license
116285Snate@binkert.org// terms below provided that you ensure that this notice is replicated
126285Snate@binkert.org// unmodified and in its entirety in all distributions of the software,
136285Snate@binkert.org// modified or unmodified, in source code or in binary form.
146285Snate@binkert.org//
156285Snate@binkert.org// Copyright (c) 2007-2008 The Florida State University
166285Snate@binkert.org// All rights reserved.
176285Snate@binkert.org//
186285Snate@binkert.org// Redistribution and use in source and binary forms, with or without
196285Snate@binkert.org// modification, are permitted provided that the following conditions are
206285Snate@binkert.org// met: redistributions of source code must retain the above copyright
216285Snate@binkert.org// notice, this list of conditions and the following disclaimer;
226285Snate@binkert.org// redistributions in binary form must reproduce the above copyright
236285Snate@binkert.org// notice, this list of conditions and the following disclaimer in the
246285Snate@binkert.org// documentation and/or other materials provided with the distribution;
256285Snate@binkert.org// neither the name of the copyright holders nor the names of its
266285Snate@binkert.org// contributors may be used to endorse or promote products derived from
276285Snate@binkert.org// this software without specific prior written permission.
286285Snate@binkert.org//
296285Snate@binkert.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
306285Snate@binkert.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
316285Snate@binkert.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
326285Snate@binkert.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
336285Snate@binkert.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
346285Snate@binkert.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
356285Snate@binkert.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
366285Snate@binkert.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
376285Snate@binkert.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
386285Snate@binkert.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
396285Snate@binkert.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
406285Snate@binkert.org//
416285Snate@binkert.org// Authors: Stephen Hines
426285Snate@binkert.org
436285Snate@binkert.org////////////////////////////////////////////////////////////////////
446285Snate@binkert.org//
456285Snate@binkert.org// Bitfield definitions.
466285Snate@binkert.org//
476285Snate@binkert.org
486285Snate@binkert.org// Opcode fields
496350Spdudnik@gmail.comdef bitfield ENCODING      encoding;
506350Spdudnik@gmail.comdef bitfield OPCODE        opcode;
516285Snate@binkert.orgdef bitfield MEDIA_OPCODE  mediaOpcode;
526285Snate@binkert.orgdef bitfield MEDIA_OPCODE2 mediaOpcode2;
536285Snate@binkert.orgdef bitfield USEIMM        useImm;
546285Snate@binkert.orgdef bitfield OPCODE_24	   opcode24;
556285Snate@binkert.orgdef bitfield OPCODE_23_20  opcode23_20;
566285Snate@binkert.orgdef bitfield OPCODE_23_21  opcode23_21;
576285Snate@binkert.orgdef bitfield OPCODE_22     opcode22;
586285Snate@binkert.orgdef bitfield OPCODE_20	   opcode20;
596285Snate@binkert.orgdef bitfield OPCODE_19	   opcode19;
606285Snate@binkert.orgdef bitfield OPCODE_18	   opcode18;
616285Snate@binkert.orgdef bitfield OPCODE_15_12  opcode15_12;
626285Snate@binkert.orgdef bitfield OPCODE_15	   opcode15;
636285Snate@binkert.orgdef bitfield MISC_OPCODE   miscOpcode;
646285Snate@binkert.orgdef bitfield OPC2          opc2; 
656285Snate@binkert.orgdef bitfield OPCODE_7      opcode7;
666285Snate@binkert.orgdef bitfield OPCODE_4      opcode4;
676285Snate@binkert.org
686285Snate@binkert.orgdef bitfield IS_MISC       isMisc;
696285Snate@binkert.orgdef bitfield SEVEN_AND_FOUR sevenAndFour;
706285Snate@binkert.org
716285Snate@binkert.orgdef bitfield THUMB         thumb;
726285Snate@binkert.orgdef bitfield BIGTHUMB      bigThumb;
736285Snate@binkert.org
746285Snate@binkert.org// Other
756285Snate@binkert.orgdef bitfield COND_CODE     condCode;
766285Snate@binkert.orgdef bitfield S_FIELD       sField;
776285Snate@binkert.orgdef bitfield RN            rn;
786285Snate@binkert.orgdef bitfield RD            rd;
796285Snate@binkert.orgdef bitfield SHIFT_SIZE    shiftSize;
806285Snate@binkert.orgdef bitfield SHIFT         shift;
816285Snate@binkert.orgdef bitfield RM            rm;
826285Snate@binkert.org
836285Snate@binkert.orgdef bitfield RS            rs;
846285Snate@binkert.org
856285Snate@binkert.orgdef bitfield PUSWL         puswl;
866285Snate@binkert.orgdef bitfield PREPOST       puswl.prepost;
876285Snate@binkert.orgdef bitfield UP               puswl.up;
886285Snate@binkert.orgdef bitfield PSRUSER       puswl.psruser;
896285Snate@binkert.orgdef bitfield WRITEBACK     puswl.writeback;
906285Snate@binkert.orgdef bitfield LOADOP        puswl.loadOp;
916285Snate@binkert.org
926285Snate@binkert.orgdef bitfield PUBWL         pubwl;
936285Snate@binkert.org
946285Snate@binkert.orgdef bitfield IMM           imm;
956285Snate@binkert.org
966285Snate@binkert.orgdef bitfield IMMED_11_0    immed11_0;
976285Snate@binkert.org
986285Snate@binkert.orgdef bitfield IMMED_HI_11_8 immedHi11_8;
996285Snate@binkert.orgdef bitfield IMMED_LO_3_0  immedLo3_0;
1006285Snate@binkert.org
1016285Snate@binkert.orgdef bitfield IMMED_23_0    immed23_0;
1026285Snate@binkert.org
1036285Snate@binkert.orgdef bitfield CPNUM	   cpNum;
1046285Snate@binkert.org// Note that FP Regs are only 3 bits
1056285Snate@binkert.orgdef bitfield FN		   fn;
1066285Snate@binkert.orgdef bitfield FD		   fd;
1076285Snate@binkert.orgdef bitfield FPREGIMM	   fpRegImm;
1086285Snate@binkert.org// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1096285Snate@binkert.org// float_regfile.hh
1106285Snate@binkert.orgdef bitfield FM		   fm;
1116285Snate@binkert.orgdef bitfield FPIMM	   fpImm;
1126285Snate@binkert.orgdef bitfield PUNWL	   punwl;
1136285Snate@binkert.org
1146285Snate@binkert.org// M5 instructions
1156285Snate@binkert.orgdef bitfield M5FUNC        m5Func;
1166285Snate@binkert.org
1176285Snate@binkert.org// Thumb bitfields
1186285Snate@binkert.orgdef bitfield TOPCODE_15_13  topcode15_13;
1196285Snate@binkert.orgdef bitfield TOPCODE_13_11  topcode13_11;
1206285Snate@binkert.orgdef bitfield TOPCODE_12_11  topcode12_11;
1216285Snate@binkert.orgdef bitfield TOPCODE_12_10  topcode12_10;
1226285Snate@binkert.orgdef bitfield TOPCODE_11_9   topcode11_9;
1236285Snate@binkert.orgdef bitfield TOPCODE_11_8   topcode11_8;
1246285Snate@binkert.orgdef bitfield TOPCODE_10_9   topcode10_9;
1256285Snate@binkert.orgdef bitfield TOPCODE_10_8   topcode10_8;
1266285Snate@binkert.orgdef bitfield TOPCODE_9_6    topcode9_6;
1276285Snate@binkert.orgdef bitfield TOPCODE_7      topcode7;
1286285Snate@binkert.orgdef bitfield TOPCODE_7_6    topcode7_6;
1296285Snate@binkert.orgdef bitfield TOPCODE_7_5    topcode7_5;
1306285Snate@binkert.orgdef bitfield TOPCODE_7_4    topcode7_4;
1316285Snate@binkert.orgdef bitfield TOPCODE_3_0    topcode3_0;
132