bitfields.isa revision 11320
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010, 2011 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating
9// to a hardware implementation of the functionality of the software
10// licensed hereunder.  You may use the software subject to the license
11// terms below provided that you ensure that this notice is replicated
12// unmodified and in its entirety in all distributions of the software,
13// modified or unmodified, in source code or in binary form.
14//
15// Copyright (c) 2007-2008 The Florida State University
16// All rights reserved.
17//
18// Redistribution and use in source and binary forms, with or without
19// modification, are permitted provided that the following conditions are
20// met: redistributions of source code must retain the above copyright
21// notice, this list of conditions and the following disclaimer;
22// redistributions in binary form must reproduce the above copyright
23// notice, this list of conditions and the following disclaimer in the
24// documentation and/or other materials provided with the distribution;
25// neither the name of the copyright holders nor the names of its
26// contributors may be used to endorse or promote products derived from
27// this software without specific prior written permission.
28//
29// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40//
41// Authors: Stephen Hines
42
43////////////////////////////////////////////////////////////////////
44//
45// Bitfield definitions.
46//
47
48// Opcode fields
49def bitfield DECODERFAULT  decoderFault;
50
51def bitfield ENCODING      encoding;
52def bitfield OPCODE        opcode;
53def bitfield MEDIA_OPCODE  mediaOpcode;
54def bitfield MEDIA_OPCODE2 mediaOpcode2;
55def bitfield USEIMM        useImm;
56def bitfield OPCODE_24     opcode24;
57def bitfield OPCODE_24_23  opcode24_23;
58def bitfield OPCODE_23_20  opcode23_20;
59def bitfield OPCODE_23_21  opcode23_21;
60def bitfield OPCODE_22     opcode22;
61def bitfield OPCODE_20     opcode20;
62def bitfield OPCODE_19_16  opcode19_16;
63def bitfield OPCODE_19     opcode19;
64def bitfield OPCODE_18     opcode18;
65def bitfield OPCODE_15_12  opcode15_12;
66def bitfield OPCODE_15     opcode15;
67def bitfield MISC_OPCODE   miscOpcode;
68def bitfield OPC2          opc2;
69def bitfield OPCODE_7      opcode7;
70def bitfield OPCODE_6      opcode6;
71def bitfield OPCODE_4      opcode4;
72
73def bitfield IS_MISC       isMisc;
74def bitfield SEVEN_AND_FOUR sevenAndFour;
75
76def bitfield THUMB         thumb;
77def bitfield BIGTHUMB      bigThumb;
78def bitfield AARCH64       aarch64;
79
80// Other
81def bitfield COND_CODE     condCode;
82def bitfield S_FIELD       sField;
83def bitfield RN            rn;
84def bitfield RD            rd;
85def bitfield RT            rt;
86def bitfield SHIFT_SIZE    shiftSize;
87def bitfield SHIFT         shift;
88def bitfield RM            rm;
89
90def bitfield RS            rs;
91
92def bitfield PUSWL         puswl;
93def bitfield PREPOST       puswl.prepost;
94def bitfield UP               puswl.up;
95def bitfield PSRUSER       puswl.psruser;
96def bitfield WRITEBACK     puswl.writeback;
97def bitfield LOADOP        puswl.loadOp;
98
99def bitfield PUBWL         pubwl;
100
101def bitfield IMM           imm;
102
103def bitfield IMMED_11_0    immed11_0;
104def bitfield IMMED_7_0     immed7_0;
105
106def bitfield IMMED_HI_11_8 immedHi11_8;
107def bitfield IMMED_LO_3_0  immedLo3_0;
108
109def bitfield IMMED_23_0    immed23_0;
110
111def bitfield CPNUM         cpNum;
112// Note that FP Regs are only 3 bits
113def bitfield FN            fn;
114def bitfield FD            fd;
115def bitfield FPREGIMM      fpRegImm;
116// We can just use 3:0 for FM since the hard-wired FP regs are handled in
117// float_regfile.hh
118def bitfield FM            fm;
119def bitfield FPIMM         fpImm;
120def bitfield PUNWL         punwl;
121
122// M5 instructions
123def bitfield M5FUNC        m5Func;
124
125// 16 bit thumb bitfields
126def bitfield TOPCODE_15_13  topcode15_13;
127def bitfield TOPCODE_13_11  topcode13_11;
128def bitfield TOPCODE_12_11  topcode12_11;
129def bitfield TOPCODE_12_10  topcode12_10;
130def bitfield TOPCODE_11_9   topcode11_9;
131def bitfield TOPCODE_11_8   topcode11_8;
132def bitfield TOPCODE_10_9   topcode10_9;
133def bitfield TOPCODE_10_8   topcode10_8;
134def bitfield TOPCODE_9_6    topcode9_6;
135def bitfield TOPCODE_7      topcode7;
136def bitfield TOPCODE_7_6    topcode7_6;
137def bitfield TOPCODE_7_5    topcode7_5;
138def bitfield TOPCODE_7_4    topcode7_4;
139def bitfield TOPCODE_3_0    topcode3_0;
140
141// 32 bit thumb bitfields
142def bitfield HTOPCODE_12_11 htopcode12_11;
143def bitfield HTOPCODE_10_9  htopcode10_9;
144def bitfield HTOPCODE_9     htopcode9;
145def bitfield HTOPCODE_9_8   htopcode9_8;
146def bitfield HTOPCODE_9_5   htopcode9_5;
147def bitfield HTOPCODE_9_4   htopcode9_4;
148def bitfield HTOPCODE_8     htopcode8;
149def bitfield HTOPCODE_8_7   htopcode8_7;
150def bitfield HTOPCODE_8_6   htopcode8_6;
151def bitfield HTOPCODE_8_5   htopcode8_5;
152def bitfield HTOPCODE_7     htopcode7;
153def bitfield HTOPCODE_7_5   htopcode7_5;
154def bitfield HTOPCODE_6     htopcode6;
155def bitfield HTOPCODE_6_5   htopcode6_5;
156def bitfield HTOPCODE_5_4   htopcode5_4;
157def bitfield HTOPCODE_4     htopcode4;
158
159def bitfield HTRN           htrn;
160def bitfield HTS            hts;
161
162def bitfield LTOPCODE_15    ltopcode15;
163def bitfield LTOPCODE_11_8  ltopcode11_8;
164def bitfield LTOPCODE_7_6   ltopcode7_6;
165def bitfield LTOPCODE_7_4   ltopcode7_4;
166def bitfield LTOPCODE_4     ltopcode4;
167
168def bitfield LTRD           ltrd;
169def bitfield LTCOPROC       ltcoproc;
170