fp.isa (7356:ff7e89d1a964) | fp.isa (7363:3b3b3325140c) |
---|---|
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 --- 453 unchanged lines hidden (view full) --- 462 ''' 463}}; 464 465def format ShortFpTransfer() {{ 466 decode_block = ''' 467 return decodeShortFpTransfer(machInst); 468 ''' 469}}; | 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 --- 453 unchanged lines hidden (view full) --- 462 ''' 463}}; 464 465def format ShortFpTransfer() {{ 466 decode_block = ''' 467 return decodeShortFpTransfer(machInst); 468 ''' 469}}; |
470 471let {{ 472 header_output = ''' 473 StaticInstPtr 474 decodeVfpData(ExtMachInst machInst); 475 ''' 476 decoder_output = ''' 477 StaticInstPtr 478 decodeVfpData(ExtMachInst machInst) 479 { 480 const uint32_t opc1 = bits(machInst, 23, 20); 481 const uint32_t opc2 = bits(machInst, 19, 16); 482 const uint32_t opc3 = bits(machInst, 7, 6); 483 //const uint32_t opc4 = bits(machInst, 3, 0); 484 switch (opc1 & 0xb /* 1011 */) { 485 case 0x0: 486 return new WarnUnimplemented("vmla, vmls", machInst); 487 case 0x2: 488 if ((opc3 & 0x1) == 0) { 489 return new WarnUnimplemented("vmul", machInst); 490 } 491 case 0x1: 492 return new WarnUnimplemented("vnmla, vnmls, vnmul", machInst); 493 case 0x3: 494 if ((opc3 & 0x1) == 0) { 495 return new WarnUnimplemented("vadd", machInst); 496 } else { 497 return new WarnUnimplemented("vsub", machInst); 498 } 499 case 0x8: 500 if ((opc3 & 0x1) == 0) { 501 return new WarnUnimplemented("vdiv", machInst); 502 } 503 break; 504 case 0xb: 505 if ((opc3 & 0x1) == 0) { 506 uint32_t vd; 507 const uint32_t baseImm = 508 bits(machInst, 3, 0) | (bits(machInst, 19, 16) << 4); 509 if (bits(machInst, 8) == 0) { 510 vd = bits(machInst, 22) | (bits(machInst, 15, 12) << 1); 511 uint32_t imm = vfp_modified_imm(baseImm, false); 512 return new VmovImmS(machInst, (IntRegIndex)vd, imm); 513 } else { 514 vd = (bits(machInst, 22) << 5) | 515 (bits(machInst, 15, 12) << 1); 516 uint64_t imm = vfp_modified_imm(baseImm, true); 517 return new VmovImmD(machInst, (IntRegIndex)vd, imm); 518 } 519 } 520 switch (opc2) { 521 case 0x0: 522 if (opc3 == 1) { 523 uint32_t vd; 524 uint32_t vm; 525 if (bits(machInst, 8) == 0) { 526 vd = bits(machInst, 22) | (bits(machInst, 15, 12) << 1); 527 vm = bits(machInst, 5) | (bits(machInst, 3, 0) << 1); 528 return new VmovRegS(machInst, 529 (IntRegIndex)vd, (IntRegIndex)vm); 530 } else { 531 vd = (bits(machInst, 22) << 5) | 532 (bits(machInst, 15, 12) << 1); 533 vm = (bits(machInst, 5) << 5) | 534 (bits(machInst, 3, 0) << 1); 535 return new VmovRegD(machInst, 536 (IntRegIndex)vd, (IntRegIndex)vm); 537 } 538 } else { 539 return new WarnUnimplemented("vabs", machInst); 540 } 541 case 0x1: 542 if (opc3 == 1) { 543 return new WarnUnimplemented("vneg", machInst); 544 } else { 545 return new WarnUnimplemented("vsqrt", machInst); 546 } 547 case 0x2: 548 case 0x3: 549 // Between half and single precision. 550 return new WarnUnimplemented("vcvtb, vcvtt", machInst); 551 case 0x4: 552 case 0x5: 553 return new WarnUnimplemented("vcmp, vcmpe", machInst); 554 case 0x7: 555 if (opc3 == 0x3) { 556 // Between double and single precision. 557 return new WarnUnimplemented("vcvt", machInst); 558 } 559 break; 560 case 0x8: 561 // Between FP and int. 562 return new WarnUnimplemented("vcvt, vcvtr", machInst); 563 case 0xa: 564 case 0xb: 565 // Between FP and fixed point. 566 return new WarnUnimplemented("vcvt", machInst); 567 case 0xc: 568 case 0xd: 569 // Between FP and int. 570 return new WarnUnimplemented("vcvt, vcvtr", machInst); 571 case 0xe: 572 case 0xf: 573 // Between FP and fixed point. 574 return new WarnUnimplemented("vcvt", machInst); 575 } 576 break; 577 } 578 return new Unknown(machInst); 579 } 580 ''' 581}}; 582 583def format VfpData() {{ 584 decode_block = ''' 585 return decodeVfpData(machInst); 586 ''' 587}}; |
|