data.isa (7154:1fa6d1db1f32) data.isa (7157:788dfd6e2d0e)
1// Copyright (c) 2010 ARM Limited
2// All rights reserved
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

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

474 "adc" : decInst("Adc"),
475 "sbc" : decInst("Sbc"),
476 "cmp" : decInst("Cmp", dest="INTREG_ZERO"),
477 "sub" : decInst("Sub"),
478 "rsb" : decInst("Rsb")
479 }
480}};
481
1// Copyright (c) 2010 ARM Limited
2// All rights reserved
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

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

474 "adc" : decInst("Adc"),
475 "sbc" : decInst("Sbc"),
476 "cmp" : decInst("Cmp", dest="INTREG_ZERO"),
477 "sub" : decInst("Sub"),
478 "rsb" : decInst("Rsb")
479 }
480}};
481
482def format Thumb32DataProcPlainBin() {{
483 decode_block = '''
484 {
485 const uint32_t op = bits(machInst, 24, 20);
486 const IntRegIndex rn = (IntRegIndex)(uint32_t)bits(machInst, 19, 16);
487 const IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 11, 8);
488 switch (op) {
489 case 0x0:
490 {
491 const uint32_t imm = bits(machInst, 7, 0) |
492 (bits(machInst, 14, 12) << 8) |
493 (bits(machInst, 26) << 11);
494 return new AddImm(machInst, rd, rn, imm, true);
495 }
496 case 0x4:
497 {
498 const uint32_t imm = bits(machInst, 7, 0) |
499 (bits(machInst, 14, 12) << 8) |
500 (bits(machInst, 26) << 11) |
501 (bits(machInst, 19, 16) << 12);
502 return new MovImm(machInst, rd, INTREG_ZERO, imm, true);
503 }
504 case 0xa:
505 {
506 const uint32_t imm = bits(machInst, 7, 0) |
507 (bits(machInst, 14, 12) << 8) |
508 (bits(machInst, 26) << 11);
509 return new SubImm(machInst, rd, rn, imm, true);
510 }
511 case 0xc:
512 {
513 const uint32_t imm = bits(machInst, 7, 0) |
514 (bits(machInst, 14, 12) << 8) |
515 (bits(machInst, 26) << 11) |
516 (bits(machInst, 19, 16) << 12);
517 return new MovtImm(machInst, rd, rd, imm, true);
518 }
519 case 0x12:
520 if (!(bits(machInst, 14, 12) || bits(machInst, 7, 6))) {
521 return new WarnUnimplemented("ssat16", machInst);
522 }
523 // Fall through on purpose...
524 case 0x10:
525 return new WarnUnimplemented("ssat", machInst);
526 case 0x14:
527 return new WarnUnimplemented("sbfx", machInst);
528 case 0x16:
529 if (rn == 0xf) {
530 return new WarnUnimplemented("bfc", machInst);
531 } else {
532 return new WarnUnimplemented("bfi", machInst);
533 }
534 case 0x1a:
535 if (!(bits(machInst, 14, 12) || bits(machInst, 7, 6))) {
536 return new WarnUnimplemented("usat16", machInst);
537 }
538 // Fall through on purpose...
539 case 0x18:
540 return new WarnUnimplemented("usat", machInst);
541 case 0x1c:
542 return new WarnUnimplemented("ubfx", machInst);
543 default:
544 return new Unknown(machInst);
545 }
546 }
547 '''
548}};
549
482def format Thumb32DataProcShiftReg() {{
483
484 def decInst(mnem, dest="rd", op1="rn"):
485 return '''
486 if (s) {
487 return new %(mnem)sRegCc(machInst, %(dest)s,
488 %(op1)s, rm, amt, type);
489 } else {

--- 85 unchanged lines hidden ---
550def format Thumb32DataProcShiftReg() {{
551
552 def decInst(mnem, dest="rd", op1="rn"):
553 return '''
554 if (s) {
555 return new %(mnem)sRegCc(machInst, %(dest)s,
556 %(op1)s, rm, amt, type);
557 } else {

--- 85 unchanged lines hidden ---