bitfields.isa revision 12763
110448Snilay@cs.wisc.edu// -*- mode:c++ -*-
210448Snilay@cs.wisc.edu
310448Snilay@cs.wisc.edu// Copyright (c) 2010, 2011, 2018 ARM Limited
410448Snilay@cs.wisc.edu// All rights reserved
510448Snilay@cs.wisc.edu//
610448Snilay@cs.wisc.edu// The license below extends only to copyright in the software and shall
710448Snilay@cs.wisc.edu// not be construed as granting a license to any other intellectual
810448Snilay@cs.wisc.edu// property including but not limited to intellectual property relating
910448Snilay@cs.wisc.edu// to a hardware implementation of the functionality of the software
1010448Snilay@cs.wisc.edu// licensed hereunder.  You may use the software subject to the license
1110448Snilay@cs.wisc.edu// terms below provided that you ensure that this notice is replicated
1210448Snilay@cs.wisc.edu// unmodified and in its entirety in all distributions of the software,
1310448Snilay@cs.wisc.edu// modified or unmodified, in source code or in binary form.
1410448Snilay@cs.wisc.edu//
1510448Snilay@cs.wisc.edu// Copyright (c) 2007-2008 The Florida State University
1610448Snilay@cs.wisc.edu// All rights reserved.
1710448Snilay@cs.wisc.edu//
1810448Snilay@cs.wisc.edu// Redistribution and use in source and binary forms, with or without
1910448Snilay@cs.wisc.edu// modification, are permitted provided that the following conditions are
2010448Snilay@cs.wisc.edu// met: redistributions of source code must retain the above copyright
2110448Snilay@cs.wisc.edu// notice, this list of conditions and the following disclaimer;
2210447Snilay@cs.wisc.edu// redistributions in binary form must reproduce the above copyright
2310447Snilay@cs.wisc.edu// notice, this list of conditions and the following disclaimer in the
2410447Snilay@cs.wisc.edu// documentation and/or other materials provided with the distribution;
2510448Snilay@cs.wisc.edu// neither the name of the copyright holders nor the names of its
2610448Snilay@cs.wisc.edu// contributors may be used to endorse or promote products derived from
2710448Snilay@cs.wisc.edu// this software without specific prior written permission.
2810447Snilay@cs.wisc.edu//
2910447Snilay@cs.wisc.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3010447Snilay@cs.wisc.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3110447Snilay@cs.wisc.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3210447Snilay@cs.wisc.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3310447Snilay@cs.wisc.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3410447Snilay@cs.wisc.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3510447Snilay@cs.wisc.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3610447Snilay@cs.wisc.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3710447Snilay@cs.wisc.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3810447Snilay@cs.wisc.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3910447Snilay@cs.wisc.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4010447Snilay@cs.wisc.edu//
4110447Snilay@cs.wisc.edu// Authors: Stephen Hines
4210447Snilay@cs.wisc.edu
4310447Snilay@cs.wisc.edu////////////////////////////////////////////////////////////////////
4410447Snilay@cs.wisc.edu//
4510447Snilay@cs.wisc.edu// Bitfield definitions.
4610448Snilay@cs.wisc.edu//
4710447Snilay@cs.wisc.edu
4810447Snilay@cs.wisc.edu// Opcode fields
4910448Snilay@cs.wisc.edudef bitfield DECODERFAULT  decoderFault;
5010448Snilay@cs.wisc.edudef bitfield ILLEGALEXEC   illegalExecution;
5110447Snilay@cs.wisc.edu
5210447Snilay@cs.wisc.edudef bitfield ENCODING      encoding;
5310448Snilay@cs.wisc.edudef bitfield OPCODE        opcode;
5410448Snilay@cs.wisc.edudef bitfield MEDIA_OPCODE  mediaOpcode;
5510448Snilay@cs.wisc.edudef bitfield MEDIA_OPCODE2 mediaOpcode2;
5610448Snilay@cs.wisc.edudef bitfield USEIMM        useImm;
5710448Snilay@cs.wisc.edudef bitfield OPCODE_24     opcode24;
5810447Snilay@cs.wisc.edudef bitfield OPCODE_24_23  opcode24_23;
5910448Snilay@cs.wisc.edudef bitfield OPCODE_23_20  opcode23_20;
6010448Snilay@cs.wisc.edudef bitfield OPCODE_23_21  opcode23_21;
6110447Snilay@cs.wisc.edudef bitfield OPCODE_22     opcode22;
6210448Snilay@cs.wisc.edudef bitfield OPCODE_20     opcode20;
6310448Snilay@cs.wisc.edudef bitfield OPCODE_19_16  opcode19_16;
6410447Snilay@cs.wisc.edudef bitfield OPCODE_19     opcode19;
6510448Snilay@cs.wisc.edudef bitfield OPCODE_18     opcode18;
6610448Snilay@cs.wisc.edudef bitfield OPCODE_15_12  opcode15_12;
6710447Snilay@cs.wisc.edudef bitfield OPCODE_15     opcode15;
6810447Snilay@cs.wisc.edudef bitfield MISC_OPCODE   miscOpcode;
6910447Snilay@cs.wisc.edudef bitfield OPC2          opc2;
70def bitfield OPCODE_7      opcode7;
71def bitfield OPCODE_6      opcode6;
72def bitfield OPCODE_4      opcode4;
73
74def bitfield IS_MISC       isMisc;
75def bitfield SEVEN_AND_FOUR sevenAndFour;
76
77def bitfield THUMB         thumb;
78def bitfield BIGTHUMB      bigThumb;
79def bitfield AARCH64       aarch64;
80
81// Other
82def bitfield COND_CODE     condCode;
83def bitfield S_FIELD       sField;
84def bitfield RN            rn;
85def bitfield RD            rd;
86def bitfield RT            rt;
87def bitfield SHIFT_SIZE    shiftSize;
88def bitfield SHIFT         shift;
89def bitfield RM            rm;
90
91def bitfield RS            rs;
92
93def bitfield PUSWL         puswl;
94def bitfield PREPOST       puswl.prepost;
95def bitfield UP               puswl.up;
96def bitfield PSRUSER       puswl.psruser;
97def bitfield WRITEBACK     puswl.writeback;
98def bitfield LOADOP        puswl.loadOp;
99
100def bitfield PUBWL         pubwl;
101
102def bitfield IMM           imm;
103
104def bitfield IMMED_11_0    immed11_0;
105def bitfield IMMED_7_0     immed7_0;
106
107def bitfield IMMED_HI_11_8 immedHi11_8;
108def bitfield IMMED_LO_3_0  immedLo3_0;
109
110def bitfield IMMED_23_0    immed23_0;
111
112def bitfield CPNUM         cpNum;
113// Note that FP Regs are only 3 bits
114def bitfield FN            fn;
115def bitfield FD            fd;
116def bitfield FPREGIMM      fpRegImm;
117// We can just use 3:0 for FM since the hard-wired FP regs are handled in
118// float_regfile.hh
119def bitfield FM            fm;
120def bitfield FPIMM         fpImm;
121def bitfield PUNWL         punwl;
122
123// M5 instructions
124def bitfield M5FUNC        m5Func;
125
126// 16 bit thumb bitfields
127def bitfield TOPCODE_15_13  topcode15_13;
128def bitfield TOPCODE_13_11  topcode13_11;
129def bitfield TOPCODE_12_11  topcode12_11;
130def bitfield TOPCODE_12_10  topcode12_10;
131def bitfield TOPCODE_11_9   topcode11_9;
132def bitfield TOPCODE_11_8   topcode11_8;
133def bitfield TOPCODE_10_9   topcode10_9;
134def bitfield TOPCODE_10_8   topcode10_8;
135def bitfield TOPCODE_9_6    topcode9_6;
136def bitfield TOPCODE_7      topcode7;
137def bitfield TOPCODE_7_6    topcode7_6;
138def bitfield TOPCODE_7_5    topcode7_5;
139def bitfield TOPCODE_7_4    topcode7_4;
140def bitfield TOPCODE_3_0    topcode3_0;
141
142// 32 bit thumb bitfields
143def bitfield HTOPCODE_12_11 htopcode12_11;
144def bitfield HTOPCODE_10_9  htopcode10_9;
145def bitfield HTOPCODE_9     htopcode9;
146def bitfield HTOPCODE_9_8   htopcode9_8;
147def bitfield HTOPCODE_9_5   htopcode9_5;
148def bitfield HTOPCODE_9_4   htopcode9_4;
149def bitfield HTOPCODE_8     htopcode8;
150def bitfield HTOPCODE_8_7   htopcode8_7;
151def bitfield HTOPCODE_8_6   htopcode8_6;
152def bitfield HTOPCODE_8_5   htopcode8_5;
153def bitfield HTOPCODE_7     htopcode7;
154def bitfield HTOPCODE_7_5   htopcode7_5;
155def bitfield HTOPCODE_6     htopcode6;
156def bitfield HTOPCODE_6_5   htopcode6_5;
157def bitfield HTOPCODE_5_4   htopcode5_4;
158def bitfield HTOPCODE_4     htopcode4;
159
160def bitfield HTRN           htrn;
161def bitfield HTS            hts;
162
163def bitfield LTOPCODE_15    ltopcode15;
164def bitfield LTOPCODE_11_8  ltopcode11_8;
165def bitfield LTOPCODE_7_6   ltopcode7_6;
166def bitfield LTOPCODE_7_4   ltopcode7_4;
167def bitfield LTOPCODE_4     ltopcode4;
168
169def bitfield LTRD           ltrd;
170def bitfield LTCOPROC       ltcoproc;
171