bitfields.isa (6759:98101a5f7ee4) bitfields.isa (7101:cc7b579ba8b2)
1// -*- mode:c++ -*-
2
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 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//
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 ENCODING encoding;
38def bitfield OPCODE opcode;
39def bitfield MEDIA_OPCODE mediaOpcode;
40def bitfield MEDIA_OPCODE2 mediaOpcode2;
41def bitfield USEIMM useImm;
42def bitfield OPCODE_24 opcode24;
43def bitfield OPCODE_23_20 opcode23_20;
44def bitfield OPCODE_23_21 opcode23_21;
45def bitfield OPCODE_22 opcode22;
46def bitfield OPCODE_20 opcode20;
47def bitfield OPCODE_19 opcode19;
48def bitfield OPCODE_18 opcode18;
49def bitfield OPCODE_15_12 opcode15_12;
50def bitfield OPCODE_15 opcode15;
51def bitfield MISC_OPCODE miscOpcode;
52def bitfield OPC2 opc2;
53def bitfield OPCODE_7 opcode7;
54def bitfield OPCODE_4 opcode4;
55
56def bitfield IS_MISC isMisc;
57def bitfield SEVEN_AND_FOUR sevenAndFour;
58
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 ENCODING encoding;
50def bitfield OPCODE opcode;
51def bitfield MEDIA_OPCODE mediaOpcode;
52def bitfield MEDIA_OPCODE2 mediaOpcode2;
53def bitfield USEIMM useImm;
54def bitfield OPCODE_24 opcode24;
55def bitfield OPCODE_23_20 opcode23_20;
56def bitfield OPCODE_23_21 opcode23_21;
57def bitfield OPCODE_22 opcode22;
58def bitfield OPCODE_20 opcode20;
59def bitfield OPCODE_19 opcode19;
60def bitfield OPCODE_18 opcode18;
61def bitfield OPCODE_15_12 opcode15_12;
62def bitfield OPCODE_15 opcode15;
63def bitfield MISC_OPCODE miscOpcode;
64def bitfield OPC2 opc2;
65def bitfield OPCODE_7 opcode7;
66def bitfield OPCODE_4 opcode4;
67
68def bitfield IS_MISC isMisc;
69def bitfield SEVEN_AND_FOUR sevenAndFour;
70
71def bitfield THUMB thumb;
72def bitfield BIGTHUMB bigThumb;
73
59// Other
60def bitfield COND_CODE condCode;
61def bitfield S_FIELD sField;
62def bitfield RN rn;
63def bitfield RD rd;
64def bitfield SHIFT_SIZE shiftSize;
65def bitfield SHIFT shift;
66def bitfield RM rm;
67
68def bitfield RS rs;
69
70def bitfield PUSWL puswl;
71def bitfield PREPOST puswl.prepost;
72def bitfield UP puswl.up;
73def bitfield PSRUSER puswl.psruser;
74def bitfield WRITEBACK puswl.writeback;
75def bitfield LOADOP puswl.loadOp;
76
77def bitfield PUBWL pubwl;
78
79def bitfield IMM imm;
80
81def bitfield IMMED_11_0 immed11_0;
82
83def bitfield IMMED_HI_11_8 immedHi11_8;
84def bitfield IMMED_LO_3_0 immedLo3_0;
85
86def bitfield IMMED_23_0 immed23_0;
87
88def bitfield CPNUM cpNum;
89// Note that FP Regs are only 3 bits
90def bitfield FN fn;
91def bitfield FD fd;
92def bitfield FPREGIMM fpRegImm;
93// We can just use 3:0 for FM since the hard-wired FP regs are handled in
94// float_regfile.hh
95def bitfield FM fm;
96def bitfield FPIMM fpImm;
97def bitfield PUNWL punwl;
98
99// M5 instructions
100def bitfield M5FUNC m5Func;
101
74// Other
75def bitfield COND_CODE condCode;
76def bitfield S_FIELD sField;
77def bitfield RN rn;
78def bitfield RD rd;
79def bitfield SHIFT_SIZE shiftSize;
80def bitfield SHIFT shift;
81def bitfield RM rm;
82
83def bitfield RS rs;
84
85def bitfield PUSWL puswl;
86def bitfield PREPOST puswl.prepost;
87def bitfield UP puswl.up;
88def bitfield PSRUSER puswl.psruser;
89def bitfield WRITEBACK puswl.writeback;
90def bitfield LOADOP puswl.loadOp;
91
92def bitfield PUBWL pubwl;
93
94def bitfield IMM imm;
95
96def bitfield IMMED_11_0 immed11_0;
97
98def bitfield IMMED_HI_11_8 immedHi11_8;
99def bitfield IMMED_LO_3_0 immedLo3_0;
100
101def bitfield IMMED_23_0 immed23_0;
102
103def bitfield CPNUM cpNum;
104// Note that FP Regs are only 3 bits
105def bitfield FN fn;
106def bitfield FD fd;
107def bitfield FPREGIMM fpRegImm;
108// We can just use 3:0 for FM since the hard-wired FP regs are handled in
109// float_regfile.hh
110def bitfield FM fm;
111def bitfield FPIMM fpImm;
112def bitfield PUNWL punwl;
113
114// M5 instructions
115def bitfield M5FUNC m5Func;
116