branch.isa (7613:62159049ca81) | branch.isa (8909:7fa0a081f12f) |
---|---|
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 --- 222 unchanged lines hidden (view full) --- 231 (IntRegIndex)(uint32_t)bits(machInst, 11, 8); 232 return new MrsSpsr(machInst, rd); 233 } 234 } 235 break; 236 } 237 case 0x1: 238 { | 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 --- 222 unchanged lines hidden (view full) --- 231 (IntRegIndex)(uint32_t)bits(machInst, 11, 8); 232 return new MrsSpsr(machInst, rd); 233 } 234 } 235 break; 236 } 237 case 0x1: 238 { |
239 ConditionCode condCode; 240 if(machInst.itstateMask) { 241 condCode = (ConditionCode)(uint8_t)machInst.itstateCond; 242 } else { 243 condCode = COND_UC; 244 } 245 | |
246 const uint32_t s = bits(machInst, 26); 247 const uint32_t i1 = !(bits(machInst, 13) ^ s); 248 const uint32_t i2 = !(bits(machInst, 11) ^ s); 249 const uint32_t imm10 = bits(machInst, 25, 16); 250 const uint32_t imm11 = bits(machInst, 10, 0); 251 const int32_t imm = sext<25>((s << 24) | 252 (i1 << 23) | (i2 << 22) | 253 (imm10 << 12) | (imm11 << 1)); | 239 const uint32_t s = bits(machInst, 26); 240 const uint32_t i1 = !(bits(machInst, 13) ^ s); 241 const uint32_t i2 = !(bits(machInst, 11) ^ s); 242 const uint32_t imm10 = bits(machInst, 25, 16); 243 const uint32_t imm11 = bits(machInst, 10, 0); 244 const int32_t imm = sext<25>((s << 24) | 245 (i1 << 23) | (i2 << 22) | 246 (imm10 << 12) | (imm11 << 1)); |
254 return new B(machInst, imm, condCode); | 247 return new B(machInst, imm, COND_UC); |
255 } 256 case 0x4: 257 { 258 if (bits(machInst, 0) == 1) { 259 return new Unknown(machInst); 260 } | 248 } 249 case 0x4: 250 { 251 if (bits(machInst, 0) == 1) { 252 return new Unknown(machInst); 253 } |
261 ConditionCode condCode; 262 if(machInst.itstateMask) { 263 condCode = (ConditionCode)(uint8_t)machInst.itstateCond; 264 } else { 265 condCode = COND_UC; 266 } | |
267 const uint32_t s = bits(machInst, 26); 268 const uint32_t i1 = !(bits(machInst, 13) ^ s); 269 const uint32_t i2 = !(bits(machInst, 11) ^ s); 270 const uint32_t imm10h = bits(machInst, 25, 16); 271 const uint32_t imm10l = bits(machInst, 10, 1); 272 const int32_t imm = sext<25>((s << 24) | 273 (i1 << 23) | (i2 << 22) | 274 (imm10h << 12) | (imm10l << 2)); | 254 const uint32_t s = bits(machInst, 26); 255 const uint32_t i1 = !(bits(machInst, 13) ^ s); 256 const uint32_t i2 = !(bits(machInst, 11) ^ s); 257 const uint32_t imm10h = bits(machInst, 25, 16); 258 const uint32_t imm10l = bits(machInst, 10, 1); 259 const int32_t imm = sext<25>((s << 24) | 260 (i1 << 23) | (i2 << 22) | 261 (imm10h << 12) | (imm10l << 2)); |
275 return new BlxImm(machInst, imm, condCode); | 262 return new BlxImm(machInst, imm, COND_UC); |
276 } 277 case 0x5: 278 { | 263 } 264 case 0x5: 265 { |
279 ConditionCode condCode; 280 if(machInst.itstateMask) { 281 condCode = (ConditionCode)(uint8_t)machInst.itstateCond; 282 } else { 283 condCode = COND_UC; 284 } | |
285 const uint32_t s = bits(machInst, 26); 286 const uint32_t i1 = !(bits(machInst, 13) ^ s); 287 const uint32_t i2 = !(bits(machInst, 11) ^ s); 288 const uint32_t imm10 = bits(machInst, 25, 16); 289 const uint32_t imm11 = bits(machInst, 10, 0); 290 const int32_t imm = sext<25>((s << 24) | 291 (i1 << 23) | (i2 << 22) | 292 (imm10 << 12) | (imm11 << 1)); | 266 const uint32_t s = bits(machInst, 26); 267 const uint32_t i1 = !(bits(machInst, 13) ^ s); 268 const uint32_t i2 = !(bits(machInst, 11) ^ s); 269 const uint32_t imm10 = bits(machInst, 25, 16); 270 const uint32_t imm11 = bits(machInst, 10, 0); 271 const int32_t imm = sext<25>((s << 24) | 272 (i1 << 23) | (i2 << 22) | 273 (imm10 << 12) | (imm11 << 1)); |
293 return new Bl(machInst, imm, condCode); | 274 return new Bl(machInst, imm, COND_UC); |
294 } 295 default: 296 break; 297 } 298 return new Unknown(machInst); 299 } 300 ''' 301}}; | 275 } 276 default: 277 break; 278 } 279 return new Unknown(machInst); 280 } 281 ''' 282}}; |