Deleted Added
sdiff udiff text old ( 13587:9d4da35335af ) new ( 13589:13522f2a5126 )
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
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

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

220}};
221
222def format ArmSyncMem() {{
223 decode_block = '''
224 {
225 const IntRegIndex rn = (IntRegIndex)(uint32_t)bits(machInst, 19, 16);
226 const IntRegIndex rt = (IntRegIndex)(uint32_t)bits(machInst, 15, 12);
227 const IntRegIndex rt2 = (IntRegIndex)(uint32_t)bits(machInst, 3, 0);
228 switch (PUBWL) {
229 case 0x18:
230 return new %(strex)s(machInst, rt, rt2, rn, true, 0);
231 case 0x19:
232 return new %(ldrex)s(machInst, rt, rn, true, 0);
233 case 0x1a:
234 return new %(strexd)s(machInst, rt, rt2, rt2 + 1, rn, true, 0);
235 case 0x1b:
236 return new %(ldrexd)s(machInst, rt, rt + 1, rn, true, 0);
237 case 0x1c:
238 return new %(strexb)s(machInst, rt, rt2, rn, true, 0);
239 case 0x1d:
240 return new %(ldrexb)s(machInst, rt, rn, true, 0);
241 case 0x1e:
242 return new %(strexh)s(machInst, rt, rt2, rn, true, 0);
243 case 0x1f:
244 return new %(ldrexh)s(machInst, rt, rn, true, 0);
245 default:
246 return new Unknown(machInst);
247 }
248 }
249 ''' % {
250 "ldrex" : "LDREX_" + loadImmClassName(False, True, False, size=4),
251 "ldrexb" : "LDREXB_" + loadImmClassName(False, True, False, size=1),
252 "ldrexh" : "LDREXH_" + loadImmClassName(False, True, False, size=2),
253 "ldrexd" : "LDREXD_" + loadDoubleImmClassName(False, True, False),
254 "strex" : "STREX_" + storeImmClassName(False, True, False, size=4),
255 "strexb" : "STREXB_" + storeImmClassName(False, True, False, size=1),
256 "strexh" : "STREXH_" + storeImmClassName(False, True, False, size=2),
257 "strexd" : "STREXD_" + storeDoubleImmClassName(False, True, False)
258 }
259}};
260
261def format Thumb32SrsRfe() {{
262 decode_block = '''
263 {
264 const bool wb = (bits(machInst, 21) == 1);
265 const bool add = (bits(machInst, 24, 23) == 0x3);

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

336 switch (op3) {
337 case 0x4:
338 return new %(strexb)s(machInst, rd, rt, rn, true, 0);
339 case 0x5:
340 return new %(strexh)s(machInst, rd, rt, rn, true, 0);
341 case 0x7:
342 return new %(strexd)s(machInst, rd, rt,
343 rt2, rn, true, 0);
344 default:
345 return new Unknown(machInst);
346 }
347 } else {
348 switch (op3) {
349 case 0x0:
350 return new Tbb(machInst, rn, rd);
351 case 0x1:
352 return new Tbh(machInst, rn, rd);
353 case 0x4:
354 return new %(ldrexb)s(machInst, rt, rn, true, 0);
355 case 0x5:
356 return new %(ldrexh)s(machInst, rt, rn, true, 0);
357 case 0x7:
358 return new %(ldrexd)s(machInst, rt, rt2, rn, true, 0);
359 default:
360 return new Unknown(machInst);
361 }
362 }
363 }
364 } else {
365 const uint32_t puw = (bits(machInst, 24, 23) << 1) |
366 bits(machInst, 21);

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

417 "ldrd_pw" : loadDoubleImmClassName(False, False, True),
418 "ldrd_pu" : loadDoubleImmClassName(False, True, False),
419 "ldrd_puw" : loadDoubleImmClassName(False, True, True),
420 "strd_w" : storeDoubleImmClassName(True, False, True),
421 "strd_uw" : storeDoubleImmClassName(True, True, True),
422 "strd_p" : storeDoubleImmClassName(False, False, False),
423 "strd_pw" : storeDoubleImmClassName(False, False, True),
424 "strd_pu" : storeDoubleImmClassName(False, True, False),
425 "strd_puw" : storeDoubleImmClassName(False, True, True)
426 }
427}};
428
429def format Thumb32LoadWord() {{
430 decode = '''
431 {
432 uint32_t op1 = bits(machInst, 24, 23);
433 if (bits(op1, 1) == 0) {

--- 631 unchanged lines hidden ---