2 * Copyright (c) 2007-2008 The Florida State University
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * Authors: Stephen Hines
31 #ifndef __ARCH_ARM_TYPES_HH__
32 #define __ARCH_ARM_TYPES_HH__
34 #include "base/bitunion.hh"
35 #include "base/types.hh"
39 typedef uint32_t MachInst;
41 BitUnion64(ExtMachInst)
42 // Made up bitfields that make life easier.
43 Bitfield<33> sevenAndFour;
46 // All the different types of opcode fields.
47 Bitfield<27, 25> encoding;
48 Bitfield<24, 21> opcode;
49 Bitfield<24, 20> mediaOpcode;
50 Bitfield<24> opcode24;
51 Bitfield<23, 20> opcode23_20;
52 Bitfield<23, 21> opcode23_21;
53 Bitfield<22> opcode22;
54 Bitfield<19> opcode19;
55 Bitfield<15, 12> opcode15_12;
56 Bitfield<15> opcode15;
57 Bitfield<7, 4> miscOpcode;
61 Bitfield<31, 28> condCode;
65 Bitfield<11, 7> shiftSize;
71 SubBitUnion(puswl, 24, 20)
75 Bitfield<21> writeback;
79 Bitfield<24, 20> pubwl;
83 Bitfield<11, 8> rotate;
85 Bitfield<11, 0> immed11_0;
86 Bitfield<7, 0> immed7_0;
88 Bitfield<11, 8> immedHi11_8;
89 Bitfield<3, 0> immedLo3_0;
91 Bitfield<15, 0> regList;
93 Bitfield<23, 0> offset;
95 Bitfield<23, 0> immed23_0;
97 Bitfield<11, 8> cpNum;
100 Bitfield<3> fpRegImm;
102 Bitfield<2, 0> fpImm;
103 Bitfield<24, 20> punwl;
105 Bitfield<7, 0> m5Func;
106 EndBitUnion(ExtMachInst)
108 // Shift types for ARM instructions
116 typedef uint64_t LargestRead;
117 // Need to use 64 bits to make sure that read requests get handled properly
119 typedef int RegContextParam;
120 typedef int RegContextVal;
122 //used in FP convert & round function
146 //used in FP convert & round function
164 struct CoreSpecific {
165 // Empty for now on the ARM
168 } // namespace ArmISA