bitfields.isa revision 7105
15729SN/A// -*- mode:c++ -*-
25729SN/A
35729SN/A// Copyright (c) 2010 ARM Limited
410036SAli.Saidi@ARM.com// All rights reserved
58835SAli.Saidi@ARM.com//
610036SAli.Saidi@ARM.com// The license below extends only to copyright in the software and shall
77873SN/A// not be construed as granting a license to any other intellectual
87873SN/A// property including but not limited to intellectual property relating
97873SN/A// to a hardware implementation of the functionality of the software
105729SN/A// licensed hereunder.  You may use the software subject to the license
115729SN/A// terms below provided that you ensure that this notice is replicated
125729SN/A// unmodified and in its entirety in all distributions of the software,
1310315Snilay@cs.wisc.edu// modified or unmodified, in source code or in binary form.
148835SAli.Saidi@ARM.com//
159885Sstever@gmail.com// Copyright (c) 2007-2008 The Florida State University
169885Sstever@gmail.com// All rights reserved.
1710036SAli.Saidi@ARM.com//
1811388Ssteve.reinhardt@amd.com// Redistribution and use in source and binary forms, with or without
198835SAli.Saidi@ARM.com// modification, are permitted provided that the following conditions are
208835SAli.Saidi@ARM.com// met: redistributions of source code must retain the above copyright
2110315Snilay@cs.wisc.edu// notice, this list of conditions and the following disclaimer;
228835SAli.Saidi@ARM.com// redistributions in binary form must reproduce the above copyright
2310315Snilay@cs.wisc.edu// notice, this list of conditions and the following disclaimer in the
249481Snilay@cs.wisc.edu// documentation and/or other materials provided with the distribution;
259481Snilay@cs.wisc.edu// neither the name of the copyright holders nor the names of its
268673SN/A// contributors may be used to endorse or promote products derived from
2710901Snilay@cs.wisc.edu// this software without specific prior written permission.
2811388Ssteve.reinhardt@amd.com//
298721SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
308835SAli.Saidi@ARM.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
318835SAli.Saidi@ARM.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
327935SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
337935SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
347935SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
357935SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
367935SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
377935SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
387935SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
398983Snate@binkert.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
405729SN/A//
419885Sstever@gmail.com// Authors: Stephen Hines
429885Sstever@gmail.com
439885Sstever@gmail.com////////////////////////////////////////////////////////////////////
4410315Snilay@cs.wisc.edu//
4510036SAli.Saidi@ARM.com// Bitfield definitions.
4610315Snilay@cs.wisc.edu//
479885Sstever@gmail.com
489885Sstever@gmail.com// Opcode fields
495729SN/Adef bitfield ENCODING      encoding;
505729SN/Adef bitfield OPCODE        opcode;
519885Sstever@gmail.comdef bitfield MEDIA_OPCODE  mediaOpcode;
5210315Snilay@cs.wisc.edudef bitfield MEDIA_OPCODE2 mediaOpcode2;
535850SN/Adef bitfield USEIMM        useImm;
549885Sstever@gmail.comdef bitfield OPCODE_24     opcode24;
555729SN/Adef bitfield OPCODE_23_20  opcode23_20;
565796SN/Adef bitfield OPCODE_23_21  opcode23_21;
578835SAli.Saidi@ARM.comdef bitfield OPCODE_22     opcode22;
585796SN/Adef bitfield OPCODE_20     opcode20;
595729SN/Adef bitfield OPCODE_19_16  opcode19_16;
6010036SAli.Saidi@ARM.comdef bitfield OPCODE_19     opcode19;
615729SN/Adef bitfield OPCODE_18     opcode18;
625729SN/Adef bitfield OPCODE_15_12  opcode15_12;
638835SAli.Saidi@ARM.comdef bitfield OPCODE_15     opcode15;
649481Snilay@cs.wisc.edudef bitfield MISC_OPCODE   miscOpcode;
655729SN/Adef bitfield OPC2          opc2; 
665729SN/Adef bitfield OPCODE_7      opcode7;
675729SN/Adef bitfield OPCODE_6      opcode6;
685729SN/Adef bitfield OPCODE_4      opcode4;
695729SN/A
705729SN/Adef bitfield IS_MISC       isMisc;
718835SAli.Saidi@ARM.comdef bitfield SEVEN_AND_FOUR sevenAndFour;
725729SN/A
739885Sstever@gmail.comdef bitfield THUMB         thumb;
7410315Snilay@cs.wisc.edudef bitfield BIGTHUMB      bigThumb;
759481Snilay@cs.wisc.edu
765729SN/A// Other
775729SN/Adef bitfield COND_CODE     condCode;
785729SN/Adef bitfield S_FIELD       sField;
795729SN/Adef bitfield RN            rn;
805729SN/Adef bitfield RD            rd;
815729SN/Adef bitfield SHIFT_SIZE    shiftSize;
829885Sstever@gmail.comdef bitfield SHIFT         shift;
839885Sstever@gmail.comdef bitfield RM            rm;
849885Sstever@gmail.com
859885Sstever@gmail.comdef bitfield RS            rs;
8610036SAli.Saidi@ARM.com
879885Sstever@gmail.comdef bitfield PUSWL         puswl;
885729SN/Adef bitfield PREPOST       puswl.prepost;
8911103Snilay@cs.wisc.edudef bitfield UP               puswl.up;
909885Sstever@gmail.comdef bitfield PSRUSER       puswl.psruser;
918983Snate@binkert.orgdef bitfield WRITEBACK     puswl.writeback;
925729SN/Adef bitfield LOADOP        puswl.loadOp;
939885Sstever@gmail.com
9411388Ssteve.reinhardt@amd.comdef bitfield PUBWL         pubwl;
9510645Snilay@cs.wisc.edu
9610036SAli.Saidi@ARM.comdef bitfield IMM           imm;
979373Snilay@cs.wisc.edu
9810901Snilay@cs.wisc.edudef bitfield IMMED_11_0    immed11_0;
995729SN/A
1009373Snilay@cs.wisc.edudef bitfield IMMED_HI_11_8 immedHi11_8;
1015876SN/Adef bitfield IMMED_LO_3_0  immedLo3_0;
1028835SAli.Saidi@ARM.com
1039373Snilay@cs.wisc.edudef bitfield IMMED_23_0    immed23_0;
10410036SAli.Saidi@ARM.com
1055729SN/Adef bitfield CPNUM         cpNum;
1068835SAli.Saidi@ARM.com// Note that FP Regs are only 3 bits
1079885Sstever@gmail.comdef bitfield FN            fn;
1089373Snilay@cs.wisc.edudef bitfield FD            fd;
1095729SN/Adef bitfield FPREGIMM      fpRegImm;
11011388Ssteve.reinhardt@amd.com// We can just use 3:0 for FM since the hard-wired FP regs are handled in
1115729SN/A// float_regfile.hh
1128983Snate@binkert.orgdef bitfield FM            fm;
1135729SN/Adef bitfield FPIMM         fpImm;
1149885Sstever@gmail.comdef bitfield PUNWL         punwl;
1159885Sstever@gmail.com
1169885Sstever@gmail.com// M5 instructions
1179885Sstever@gmail.comdef bitfield M5FUNC        m5Func;
1189885Sstever@gmail.com
11910036SAli.Saidi@ARM.com// Thumb bitfields
1209885Sstever@gmail.comdef bitfield TOPCODE_15_13  topcode15_13;
12110036SAli.Saidi@ARM.comdef bitfield TOPCODE_13_11  topcode13_11;
1229885Sstever@gmail.comdef bitfield TOPCODE_12_11  topcode12_11;
1239885Sstever@gmail.comdef bitfield TOPCODE_12_10  topcode12_10;
1245729SN/Adef bitfield TOPCODE_11_9   topcode11_9;
1256024SN/Adef bitfield TOPCODE_11_8   topcode11_8;
1268835SAli.Saidi@ARM.comdef bitfield TOPCODE_10_9   topcode10_9;
12710036SAli.Saidi@ARM.comdef bitfield TOPCODE_10_8   topcode10_8;
1285729SN/Adef bitfield TOPCODE_9_6    topcode9_6;
1298835SAli.Saidi@ARM.comdef bitfield TOPCODE_7      topcode7;
1308835SAli.Saidi@ARM.comdef bitfield TOPCODE_7_6    topcode7_6;
1318835SAli.Saidi@ARM.comdef bitfield TOPCODE_7_5    topcode7_5;
1328835SAli.Saidi@ARM.comdef bitfield TOPCODE_7_4    topcode7_4;
1339885Sstever@gmail.comdef bitfield TOPCODE_3_0    topcode3_0;
13410036SAli.Saidi@ARM.com