bitfields.isa revision 7105
14202Sbinkertn@umich.edu// -*- mode:c++ -*-
24202Sbinkertn@umich.edu
34202Sbinkertn@umich.edu// Copyright (c) 2010 ARM Limited
44202Sbinkertn@umich.edu// All rights reserved
54202Sbinkertn@umich.edu//
64202Sbinkertn@umich.edu// The license below extends only to copyright in the software and shall
74202Sbinkertn@umich.edu// not be construed as granting a license to any other intellectual
84202Sbinkertn@umich.edu// property including but not limited to intellectual property relating
94202Sbinkertn@umich.edu// to a hardware implementation of the functionality of the software
104202Sbinkertn@umich.edu// licensed hereunder.  You may use the software subject to the license
114202Sbinkertn@umich.edu// terms below provided that you ensure that this notice is replicated
124202Sbinkertn@umich.edu// unmodified and in its entirety in all distributions of the software,
134202Sbinkertn@umich.edu// modified or unmodified, in source code or in binary form.
144202Sbinkertn@umich.edu//
154202Sbinkertn@umich.edu// Copyright (c) 2007-2008 The Florida State University
164202Sbinkertn@umich.edu// All rights reserved.
174202Sbinkertn@umich.edu//
184202Sbinkertn@umich.edu// Redistribution and use in source and binary forms, with or without
194202Sbinkertn@umich.edu// modification, are permitted provided that the following conditions are
204202Sbinkertn@umich.edu// met: redistributions of source code must retain the above copyright
214202Sbinkertn@umich.edu// notice, this list of conditions and the following disclaimer;
224202Sbinkertn@umich.edu// redistributions in binary form must reproduce the above copyright
234202Sbinkertn@umich.edu// notice, this list of conditions and the following disclaimer in the
244202Sbinkertn@umich.edu// documentation and/or other materials provided with the distribution;
254202Sbinkertn@umich.edu// neither the name of the copyright holders nor the names of its
264202Sbinkertn@umich.edu// contributors may be used to endorse or promote products derived from
274202Sbinkertn@umich.edu// this software without specific prior written permission.
284202Sbinkertn@umich.edu//
294202Sbinkertn@umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
304202Sbinkertn@umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
314202Sbinkertn@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
324202Sbinkertn@umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
334202Sbinkertn@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
345548Snate@binkert.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
354202Sbinkertn@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
364202Sbinkertn@umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
374202Sbinkertn@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
384202Sbinkertn@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
394202Sbinkertn@umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
404550Sbinkertn@umich.edu//
414550Sbinkertn@umich.edu// Authors: Stephen Hines
424202Sbinkertn@umich.edu
434202Sbinkertn@umich.edu////////////////////////////////////////////////////////////////////
444202Sbinkertn@umich.edu//
454202Sbinkertn@umich.edu// Bitfield definitions.
464202Sbinkertn@umich.edu//
474202Sbinkertn@umich.edu
484202Sbinkertn@umich.edu// Opcode fields
494202Sbinkertn@umich.edudef bitfield ENCODING      encoding;
504202Sbinkertn@umich.edudef bitfield OPCODE        opcode;
514202Sbinkertn@umich.edudef bitfield MEDIA_OPCODE  mediaOpcode;
524202Sbinkertn@umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2;
535190Ssaidi@eecs.umich.edudef bitfield USEIMM        useImm;
544202Sbinkertn@umich.edudef bitfield OPCODE_24     opcode24;
554202Sbinkertn@umich.edudef bitfield OPCODE_23_20  opcode23_20;
564202Sbinkertn@umich.edudef bitfield OPCODE_23_21  opcode23_21;
574202Sbinkertn@umich.edudef bitfield OPCODE_22     opcode22;
584202Sbinkertn@umich.edudef bitfield OPCODE_20     opcode20;
594202Sbinkertn@umich.edudef bitfield OPCODE_19_16  opcode19_16;
604202Sbinkertn@umich.edudef bitfield OPCODE_19     opcode19;
614202Sbinkertn@umich.edudef bitfield OPCODE_18     opcode18;
624202Sbinkertn@umich.edudef bitfield OPCODE_15_12  opcode15_12;
634202Sbinkertn@umich.edudef bitfield OPCODE_15     opcode15;
644202Sbinkertn@umich.edudef bitfield MISC_OPCODE   miscOpcode;
654202Sbinkertn@umich.edudef bitfield OPC2          opc2; 
664202Sbinkertn@umich.edudef bitfield OPCODE_7      opcode7;
674202Sbinkertn@umich.edudef bitfield OPCODE_6      opcode6;
684202Sbinkertn@umich.edudef bitfield OPCODE_4      opcode4;
695222Sksewell@umich.edu
704202Sbinkertn@umich.edudef bitfield IS_MISC       isMisc;
714202Sbinkertn@umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour;
724202Sbinkertn@umich.edu
734202Sbinkertn@umich.edudef bitfield THUMB         thumb;
744202Sbinkertn@umich.edudef bitfield BIGTHUMB      bigThumb;
754202Sbinkertn@umich.edu
764202Sbinkertn@umich.edu// Other
774202Sbinkertn@umich.edudef bitfield COND_CODE     condCode;
784202Sbinkertn@umich.edudef bitfield S_FIELD       sField;
794202Sbinkertn@umich.edudef bitfield RN            rn;
804202Sbinkertn@umich.edudef bitfield RD            rd;
814202Sbinkertn@umich.edudef bitfield SHIFT_SIZE    shiftSize;
824202Sbinkertn@umich.edudef bitfield SHIFT         shift;
834382Sbinkertn@umich.edudef bitfield RM            rm;
845192Ssaidi@eecs.umich.edu
855192Ssaidi@eecs.umich.edudef bitfield RS            rs;
865192Ssaidi@eecs.umich.edu
875192Ssaidi@eecs.umich.edudef bitfield PUSWL         puswl;
885192Ssaidi@eecs.umich.edudef bitfield PREPOST       puswl.prepost;
895192Ssaidi@eecs.umich.edudef bitfield UP               puswl.up;
905192Ssaidi@eecs.umich.edudef bitfield PSRUSER       puswl.psruser;
915192Ssaidi@eecs.umich.edudef bitfield WRITEBACK     puswl.writeback;
925192Ssaidi@eecs.umich.edudef bitfield LOADOP        puswl.loadOp;
935192Ssaidi@eecs.umich.edu
945192Ssaidi@eecs.umich.edudef bitfield PUBWL         pubwl;
955192Ssaidi@eecs.umich.edu
965192Ssaidi@eecs.umich.edudef bitfield IMM           imm;
97
98def bitfield IMMED_11_0    immed11_0;
99
100def bitfield IMMED_HI_11_8 immedHi11_8;
101def bitfield IMMED_LO_3_0  immedLo3_0;
102
103def bitfield IMMED_23_0    immed23_0;
104
105def bitfield CPNUM         cpNum;
106// Note that FP Regs are only 3 bits
107def bitfield FN            fn;
108def bitfield FD            fd;
109def bitfield FPREGIMM      fpRegImm;
110// We can just use 3:0 for FM since the hard-wired FP regs are handled in
111// float_regfile.hh
112def bitfield FM            fm;
113def bitfield FPIMM         fpImm;
114def bitfield PUNWL         punwl;
115
116// 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