Deleted Added
sdiff udiff text old ( 7200:64bc968a1d10 ) new ( 7204:8ed494406e30 )
full compact
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

--- 96 unchanged lines hidden (view full) ---

105 '''
106}};
107
108def format Thumb32BranchesAndMiscCtrl() {{
109 decode_block = '''
110 {
111 const uint32_t op = bits(machInst, 26, 20);
112 const uint32_t op1 = bits(machInst, 14, 12);
113 const uint32_t op2 = bits(machInst, 11, 8);
114 switch (op1 & 0x5) {
115 case 0x0:
116 if (op == 127) {
117 if (op1 & 0x2) {
118 // Permanentl undefined.
119 return new WarnUnimplemented("undefined", machInst);
120 } else {
121 return new WarnUnimplemented("smc", machInst);

--- 7 unchanged lines hidden (view full) ---

129 const int32_t imm = sext<21>((s << 20) |
130 (j2 << 19) | (j1 << 18) |
131 (imm6 << 12) | (imm11 << 1));
132 return new B(machInst, imm,
133 (ConditionCode)(uint32_t)bits(machInst, 25, 22));
134 } else {
135 switch (op) {
136 case 0x38:
137 if ((op2 & 0x3) == 0) {
138 // Application level
139 return new WarnUnimplemented("msr", machInst);
140 }
141 // Fall through on purpose...
142 case 0x39:
143 // System level
144 return new WarnUnimplemented("msr", machInst);
145 case 0x3a:
146 {
147 const uint32_t op1 = bits(machInst, 10, 8);
148 const uint32_t op2 = bits(machInst, 7, 0);
149 if (op1 != 0) {
150 return new WarnUnimplemented("cps", machInst);
151 } else if ((op2 & 0xf0) == 0xf0) {
152 return new WarnUnimplemented("dbg", machInst);

--- 40 unchanged lines hidden (view full) ---

193 return new WarnUnimplemented("bxj", machInst);
194 case 0x3d:
195 {
196 const uint32_t imm32 = bits(machInst, 7, 0);
197 return new SubsImmPclr(machInst, INTREG_PC, INTREG_LR,
198 imm32, false);
199 }
200 case 0x3e:
201 case 0x3f:
202 return new WarnUnimplemented("mrs", machInst);
203 }
204 break;
205 }
206 case 0x1:
207 {
208 const uint32_t s = bits(machInst, 26);
209 const uint32_t i1 = !(bits(machInst, 13) ^ s);
210 const uint32_t i2 = !(bits(machInst, 11) ^ s);

--- 38 unchanged lines hidden ---