bitfields.isa revision 6019
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007-2008 The Florida State University
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer;
10// redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution;
13// neither the name of the copyright holders nor the names of its
14// contributors may be used to endorse or promote products derived from
15// this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28//
29// Authors: Stephen Hines
30
31////////////////////////////////////////////////////////////////////
32//
33// Bitfield definitions.
34//
35
36// Opcode fields
37def bitfield OPCODE        <27:25>;
38def bitfield OPCODE_27_25  <27:25>;
39def bitfield OPCODE_24_21  <24:21>;
40def bitfield OPCODE_24_23  <24:23>;
41def bitfield OPCODE_24	   <24:24>;
42def bitfield OPCODE_23_20  <23:20>;
43def bitfield OPCODE_23_21  <23:21>;
44def bitfield OPCODE_23     <23:23>;
45def bitfield OPCODE_22_8   <22: 8>;
46def bitfield OPCODE_22_21  <22:21>;
47def bitfield OPCODE_22     <22:22>;
48def bitfield OPCODE_21_20  <21:20>;
49def bitfield OPCODE_20     <20:20>;
50def bitfield OPCODE_19_18  <19:18>;
51def bitfield OPCODE_19	   <19:19>;
52def bitfield OPCODE_15_12  <15:12>;
53def bitfield OPCODE_15	   <15:15>;
54def bitfield OPCODE_9      < 9: 9>;
55def bitfield OPCODE_7_4    < 7: 4>;
56def bitfield OPCODE_7_5	   < 7: 5>;
57def bitfield OPCODE_7_6    < 7: 6>;
58def bitfield OPCODE_7      < 7: 7>;
59def bitfield OPCODE_6_5	   < 6: 5>;
60def bitfield OPCODE_6	   < 6: 6>;
61def bitfield OPCODE_5	   < 5: 5>;
62def bitfield OPCODE_4      < 4: 4>;
63
64// Other
65def bitfield COND_CODE     <31:28>;
66def bitfield S_FIELD       <20:20>;
67def bitfield RN            <19:16>;
68def bitfield RD            <15:12>;
69def bitfield SHIFT_SIZE    <11: 7>;
70def bitfield SHIFT         < 6: 5>;
71def bitfield RM            < 3: 0>;
72
73def bitfield RE            <20:16>;
74
75def bitfield RS            <11: 8>;
76
77def bitfield RDUP          <19:16>;
78def bitfield RNDN          <15:12>;
79
80def bitfield RDHI          <15:12>;
81def bitfield RDLO          <11: 8>;
82
83def bitfield U_FIELD       <23:23>;
84
85def bitfield PUSWL	   <24:20>;
86def bitfield PREPOST	   <24:24>;
87def bitfield UP		   <23:23>;
88def bitfield PSRUSER	   <22:22>;
89def bitfield WRITEBACK	   <21:21>;
90def bitfield LOADOP        <20:20>;
91
92def bitfield PUBWL	   <24:20>;
93def bitfield PUIWL	   <24:20>;
94def bitfield BYTEACCESS	   <22:22>;
95
96def bitfield LUAS	   <23:20>;
97
98def bitfield IMM	   < 7: 0>;
99def bitfield IMMED_7_4     < 7: 4>;
100def bitfield IMMED_3_0     < 3: 0>;
101
102def bitfield F_MSR         <19:19>;
103def bitfield S_MSR         <18:18>;
104def bitfield X_MSR         <17:17>;
105def bitfield C_MSR         <16:16>;
106
107def bitfield Y_6           < 6: 6>;
108def bitfield X_5           < 5: 5>;
109
110def bitfield IMMED_15_4    <15: 4>;
111
112def bitfield W_FIELD       <21:21>;
113
114def bitfield ROTATE        <11: 8>;
115def bitfield IMMED_7_0     < 7: 0>;
116
117def bitfield T_FIELD       <21:21>;
118def bitfield IMMED_11_0    <11: 0>;
119
120def bitfield IMMED_20_16   <20:16>;
121def bitfield IMMED_19_16   <19:16>;
122
123def bitfield IMMED_HI_11_8 <11: 8>;
124def bitfield IMMED_LO_3_0  < 3: 0>;
125
126def bitfield ROT           <11:10>;
127
128def bitfield R_FIELD       < 5: 5>;
129
130def bitfield CARET         <22:22>;
131def bitfield REGLIST       <15: 0>;
132
133def bitfield OFFSET        <23: 0>;
134def bitfield COPRO         <11: 8>;
135def bitfield OP1_7_4       < 7: 4>;
136def bitfield CM            < 3: 0>;
137
138def bitfield L_FIELD       <22:22>;
139def bitfield CD            <15:12>;
140def bitfield OPTION        < 7: 0>;
141
142def bitfield OP1_23_20     <23:20>;
143def bitfield CN            <19:16>;
144def bitfield OP2_7_5       < 7: 5>;
145
146def bitfield OP1_23_21     <23:21>;
147
148def bitfield IMMED_23_0    <23: 0>;
149def bitfield M_FIELD       <17:17>;
150def bitfield A_FIELD       < 8: 8>;
151def bitfield I_FIELD       < 7: 7>;
152def bitfield F_FIELD       < 6: 6>;
153def bitfield MODE          < 4: 0>;
154
155def bitfield A_BLX         <24:24>;
156
157def bitfield CPNUM	   <11: 8>;
158// Note that FP Regs are only 3 bits
159def bitfield FN		   <18:16>;
160def bitfield FD		   <14:12>;
161def bitfield FPREGIMM	   < 3: 3>;
162// We can just use 3:0 for FM since the hard-wired FP regs are handled in
163// float_regfile.hh
164def bitfield FM		   < 3: 0>;
165def bitfield FPIMM	   < 2: 0>;
166def bitfield PUNWL	   <24:20>;
167
168// M5 instructions
169def bitfield M5FUNC <7:0>;
170
171