bitfields.isa revision 7105:bec31317707b
16157Snate@binkert.org// -*- mode:c++ -*-
26157Snate@binkert.org
36157Snate@binkert.org// Copyright (c) 2010 ARM Limited
46157Snate@binkert.org// All rights reserved
56157Snate@binkert.org//
66157Snate@binkert.org// The license below extends only to copyright in the software and shall
76157Snate@binkert.org// not be construed as granting a license to any other intellectual
86157Snate@binkert.org// property including but not limited to intellectual property relating
96157Snate@binkert.org// to a hardware implementation of the functionality of the software
106157Snate@binkert.org// licensed hereunder.  You may use the software subject to the license
116157Snate@binkert.org// terms below provided that you ensure that this notice is replicated
126157Snate@binkert.org// unmodified and in its entirety in all distributions of the software,
136157Snate@binkert.org// modified or unmodified, in source code or in binary form.
146157Snate@binkert.org//
156157Snate@binkert.org// Copyright (c) 2007-2008 The Florida State University
166157Snate@binkert.org// All rights reserved.
176157Snate@binkert.org//
186157Snate@binkert.org// Redistribution and use in source and binary forms, with or without
196157Snate@binkert.org// modification, are permitted provided that the following conditions are
206157Snate@binkert.org// met: redistributions of source code must retain the above copyright
216157Snate@binkert.org// notice, this list of conditions and the following disclaimer;
226157Snate@binkert.org// redistributions in binary form must reproduce the above copyright
236157Snate@binkert.org// notice, this list of conditions and the following disclaimer in the
246157Snate@binkert.org// documentation and/or other materials provided with the distribution;
256157Snate@binkert.org// neither the name of the copyright holders nor the names of its
266157Snate@binkert.org// contributors may be used to endorse or promote products derived from
276157Snate@binkert.org// this software without specific prior written permission.
286157Snate@binkert.org//
296157Snate@binkert.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
306157Snate@binkert.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
316157Snate@binkert.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
326157Snate@binkert.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
336157Snate@binkert.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
346157Snate@binkert.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
356157Snate@binkert.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
366157Snate@binkert.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
376157Snate@binkert.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
386157Snate@binkert.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
396157Snate@binkert.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
407768SAli.Saidi@ARM.com//
417768SAli.Saidi@ARM.com// Authors: Stephen Hines
427768SAli.Saidi@ARM.com
436168Snate@binkert.org////////////////////////////////////////////////////////////////////
446168Snate@binkert.org//
456168Snate@binkert.org// Bitfield definitions.
466157Snate@binkert.org//
476157Snate@binkert.org
486157Snate@binkert.org// Opcode fields
496157Snate@binkert.orgdef bitfield ENCODING      encoding;
506157Snate@binkert.orgdef bitfield OPCODE        opcode;
516157Snate@binkert.orgdef bitfield MEDIA_OPCODE  mediaOpcode;
526157Snate@binkert.orgdef bitfield MEDIA_OPCODE2 mediaOpcode2;
536157Snate@binkert.orgdef bitfield USEIMM        useImm;
546157Snate@binkert.orgdef bitfield OPCODE_24     opcode24;
556157Snate@binkert.orgdef bitfield OPCODE_23_20  opcode23_20;
566157Snate@binkert.orgdef bitfield OPCODE_23_21  opcode23_21;
576157Snate@binkert.orgdef bitfield OPCODE_22     opcode22;
586157Snate@binkert.orgdef bitfield OPCODE_20     opcode20;
596157Snate@binkert.orgdef bitfield OPCODE_19_16  opcode19_16;
606157Snate@binkert.orgdef bitfield OPCODE_19     opcode19;
616157Snate@binkert.orgdef bitfield OPCODE_18     opcode18;
626157Snate@binkert.orgdef bitfield OPCODE_15_12  opcode15_12;
636157Snate@binkert.orgdef bitfield OPCODE_15     opcode15;
646157Snate@binkert.orgdef bitfield MISC_OPCODE   miscOpcode;
656157Snate@binkert.orgdef bitfield OPC2          opc2; 
666157Snate@binkert.orgdef bitfield OPCODE_7      opcode7;
676157Snate@binkert.orgdef bitfield OPCODE_6      opcode6;
686157Snate@binkert.orgdef bitfield OPCODE_4      opcode4;
696157Snate@binkert.org
706157Snate@binkert.orgdef bitfield IS_MISC       isMisc;
716157Snate@binkert.orgdef bitfield SEVEN_AND_FOUR sevenAndFour;
726157Snate@binkert.org
736157Snate@binkert.orgdef bitfield THUMB         thumb;
746157Snate@binkert.orgdef bitfield BIGTHUMB      bigThumb;
756157Snate@binkert.org
766157Snate@binkert.org// Other
776157Snate@binkert.orgdef bitfield COND_CODE     condCode;
786157Snate@binkert.orgdef bitfield S_FIELD       sField;
796157Snate@binkert.orgdef bitfield RN            rn;
806157Snate@binkert.orgdef bitfield RD            rd;
816157Snate@binkert.orgdef bitfield SHIFT_SIZE    shiftSize;
826157Snate@binkert.orgdef bitfield SHIFT         shift;
836157Snate@binkert.orgdef bitfield RM            rm;
846157Snate@binkert.org
856157Snate@binkert.orgdef bitfield RS            rs;
866157Snate@binkert.org
876157Snate@binkert.orgdef bitfield PUSWL         puswl;
886157Snate@binkert.orgdef bitfield PREPOST       puswl.prepost;
896157Snate@binkert.orgdef bitfield UP               puswl.up;
906157Snate@binkert.orgdef bitfield PSRUSER       puswl.psruser;
916882SBrad.Beckmann@amd.comdef bitfield WRITEBACK     puswl.writeback;
926286Snate@binkert.orgdef bitfield LOADOP        puswl.loadOp;
936286Snate@binkert.org
946286Snate@binkert.orgdef bitfield PUBWL         pubwl;
956286Snate@binkert.org
968092Snilay@cs.wisc.edudef bitfield IMM           imm;
976286Snate@binkert.org
986286Snate@binkert.orgdef bitfield IMMED_11_0    immed11_0;
996157Snate@binkert.org
1006157Snate@binkert.orgdef bitfield IMMED_HI_11_8 immedHi11_8;
1016157Snate@binkert.orgdef bitfield IMMED_LO_3_0  immedLo3_0;
1026157Snate@binkert.org
1036157Snate@binkert.orgdef bitfield IMMED_23_0    immed23_0;
1046286Snate@binkert.org
1056157Snate@binkert.orgdef bitfield CPNUM         cpNum;
1066286Snate@binkert.org// Note that FP Regs are only 3 bits
1076157Snate@binkert.orgdef bitfield FN            fn;
1086157Snate@binkert.orgdef bitfield FD            fd;
1096157Snate@binkert.orgdef bitfield FPREGIMM      fpRegImm;
1108191SLisa.Hsu@amd.com// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1116157Snate@binkert.org// float_regfile.hh
1126157Snate@binkert.orgdef bitfield FM            fm;
1136797SBrad.Beckmann@amd.comdef bitfield FPIMM         fpImm;
1146157Snate@binkert.orgdef bitfield PUNWL         punwl;
1156157Snate@binkert.org
1166157Snate@binkert.org// M5 instructions
117def bitfield M5FUNC        m5Func;
118
119// Thumb bitfields
120def bitfield TOPCODE_15_13  topcode15_13;
121def bitfield TOPCODE_13_11  topcode13_11;
122def bitfield TOPCODE_12_11  topcode12_11;
123def bitfield TOPCODE_12_10  topcode12_10;
124def bitfield TOPCODE_11_9   topcode11_9;
125def bitfield TOPCODE_11_8   topcode11_8;
126def bitfield TOPCODE_10_9   topcode10_9;
127def bitfield TOPCODE_10_8   topcode10_8;
128def bitfield TOPCODE_9_6    topcode9_6;
129def bitfield TOPCODE_7      topcode7;
130def bitfield TOPCODE_7_6    topcode7_6;
131def bitfield TOPCODE_7_5    topcode7_5;
132def bitfield TOPCODE_7_4    topcode7_4;
133def bitfield TOPCODE_3_0    topcode3_0;
134