OLD | NEW |
1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// | 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// |
2 // | 2 // |
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 // | 6 // |
7 // Modified by the Subzero authors. | 7 // Modified by the Subzero authors. |
8 // | 8 // |
9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
10 // | 10 // |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // ElmtSize = #bits in vector element. | 410 // ElmtSize = #bits in vector element. |
411 void vld1qr(size_t ElmtSize, const Operand *OpQd, const Operand *OpRn, | 411 void vld1qr(size_t ElmtSize, const Operand *OpQd, const Operand *OpRn, |
412 const TargetInfo &TInfo); | 412 const TargetInfo &TInfo); |
413 | 413 |
414 void vld1qr(size_t ElmtSize, const Operand *OpQd, const Operand *OpRn, | 414 void vld1qr(size_t ElmtSize, const Operand *OpQd, const Operand *OpRn, |
415 const TargetLowering *Lowering) { | 415 const TargetLowering *Lowering) { |
416 const TargetInfo TInfo(Lowering); | 416 const TargetInfo TInfo(Lowering); |
417 vld1qr(ElmtSize, OpQd, OpRn, TInfo); | 417 vld1qr(ElmtSize, OpQd, OpRn, TInfo); |
418 } | 418 } |
419 | 419 |
| 420 // Dn = FpImm |
420 void vmovd(const Operand *OpDn, const OperandARM32FlexFpImm *OpFpImm, | 421 void vmovd(const Operand *OpDn, const OperandARM32FlexFpImm *OpFpImm, |
421 CondARM32::Cond Cond); | 422 CondARM32::Cond Cond); |
422 | 423 |
| 424 // Dd = Dm |
423 void vmovdd(const Operand *OpDd, const Variable *OpDm, CondARM32::Cond Cond); | 425 void vmovdd(const Operand *OpDd, const Variable *OpDm, CondARM32::Cond Cond); |
424 | 426 |
| 427 // Dm = Rt:Rt2 |
425 void vmovdrr(const Operand *OpDm, const Operand *OpRt, const Operand *OpRt2, | 428 void vmovdrr(const Operand *OpDm, const Operand *OpRt, const Operand *OpRt2, |
426 CondARM32::Cond Cond); | 429 CondARM32::Cond Cond); |
427 | 430 |
| 431 // Qd[Index] = Rt |
| 432 void vmovqir(const Operand *OpQd, uint32_t Index, const Operand *OpRt, |
| 433 CondARM32::Cond Cond); |
| 434 |
| 435 // Qd[Index] = Sm |
| 436 void vmovqis(const Operand *OpQd, uint32_t Indx, const Operand *OpSm, |
| 437 CondARM32::Cond Cond); |
| 438 |
| 439 // Rt = Qm[Index] |
| 440 void vmovrqi(const Operand *OpRt, const Operand *OpQd, uint32_t Index, |
| 441 CondARM32::Cond Cond); |
| 442 |
| 443 // Rt:Rt2 = Dm |
428 void vmovrrd(const Operand *OpRt, const Operand *OpRt2, const Operand *OpDm, | 444 void vmovrrd(const Operand *OpRt, const Operand *OpRt2, const Operand *OpDm, |
429 CondARM32::Cond Cond); | 445 CondARM32::Cond Cond); |
430 | 446 |
| 447 // Rt = Sn |
431 void vmovrs(const Operand *OpRt, const Operand *OpSn, CondARM32::Cond Cond); | 448 void vmovrs(const Operand *OpRt, const Operand *OpSn, CondARM32::Cond Cond); |
432 | 449 |
| 450 // Sn = FpImm |
433 void vmovs(const Operand *OpSn, const OperandARM32FlexFpImm *OpFpImm, | 451 void vmovs(const Operand *OpSn, const OperandARM32FlexFpImm *OpFpImm, |
434 CondARM32::Cond Cond); | 452 CondARM32::Cond Cond); |
435 | 453 |
436 void vmovss(const Operand *OpDd, const Variable *OpDm, CondARM32::Cond Cond); | 454 // Sd = Sm |
| 455 void vmovss(const Operand *OpSd, const Variable *OpSm, CondARM32::Cond Cond); |
437 | 456 |
| 457 // Sd = Qm[Index] |
| 458 void vmovsqi(const Operand *OpSd, const Operand *OpQm, uint32_t Index, |
| 459 CondARM32::Cond Cond); |
| 460 |
| 461 // Sn = Rt |
438 void vmovsr(const Operand *OpSn, const Operand *OpRt, CondARM32::Cond Cond); | 462 void vmovsr(const Operand *OpSn, const Operand *OpRt, CondARM32::Cond Cond); |
439 | 463 |
440 void vmlad(const Operand *OpDd, const Operand *OpDn, const Operand *OpDm, | 464 void vmlad(const Operand *OpDd, const Operand *OpDn, const Operand *OpDm, |
441 CondARM32::Cond Cond); | 465 CondARM32::Cond Cond); |
442 | 466 |
443 void vmlas(const Operand *OpSd, const Operand *OpSn, const Operand *OpSm, | 467 void vmlas(const Operand *OpSd, const Operand *OpSn, const Operand *OpSm, |
444 CondARM32::Cond Cond); | 468 CondARM32::Cond Cond); |
445 | 469 |
446 void vmlsd(const Operand *OpDd, const Operand *OpDn, const Operand *OpDm, | 470 void vmlsd(const Operand *OpDd, const Operand *OpDn, const Operand *OpDm, |
447 CondARM32::Cond Cond); | 471 CondARM32::Cond Cond); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 // aa=Align. | 658 // aa=Align. |
635 void emitVMem1Op(IValueT Opcode, IValueT Dd, IValueT Rn, IValueT Rm, | 659 void emitVMem1Op(IValueT Opcode, IValueT Dd, IValueT Rn, IValueT Rm, |
636 DRegListSize NumDRegs, size_t ElmtSize, IValueT Align, | 660 DRegListSize NumDRegs, size_t ElmtSize, IValueT Align, |
637 const char *InstName); | 661 const char *InstName); |
638 | 662 |
639 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, | 663 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, |
640 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. | 664 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. |
641 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 665 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
642 IValueT Rm); | 666 IValueT Rm); |
643 | 667 |
| 668 // cccc1110iiiennnntttt1011Njj10000 where cccc=Cond, tttt=Rt, Ndddd=2*Qn=Dn, |
| 669 // iii=Opcode1, jj=Opcode2, Opcode1Opcode2 encodes Index and the |
| 670 // corresponding element size of the vector element, and e=IsExtract. |
| 671 void emitInsertExtractInt(CondARM32::Cond Cond, const Operand *OpQn, |
| 672 uint32_t Index, const Operand *OpRt, bool IsExtract, |
| 673 const char *InstName); |
| 674 |
| 675 // cccc11101D110000dddd101001M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm. |
| 676 // Assigns Sd the value of Sm. |
| 677 void emitMoveSS(CondARM32::Cond Cond, IValueT Sd, IValueT Sm); |
| 678 |
644 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, | 679 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, |
645 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. | 680 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. |
646 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 681 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
647 IValueT Rm, IValueT Rs, bool SetFlags); | 682 IValueT Rm, IValueT Rs, bool SetFlags); |
648 | 683 |
649 // Pattern cccc0001101s0000ddddxxxxxtt0mmmm where cccc=Cond, s=SetFlags, | 684 // Pattern cccc0001101s0000ddddxxxxxtt0mmmm where cccc=Cond, s=SetFlags, |
650 // dddd=Rd, mmmm=Rm, tt=Shift, and xxxxx is defined by OpSrc1. OpSrc1 defines | 685 // dddd=Rd, mmmm=Rm, tt=Shift, and xxxxx is defined by OpSrc1. OpSrc1 defines |
651 // either xxxxx=Imm5, or xxxxx=ssss0 where ssss=Rs. | 686 // either xxxxx=Imm5, or xxxxx=ssss0 where ssss=Rs. |
652 void emitShift(const CondARM32::Cond Cond, | 687 void emitShift(const CondARM32::Cond Cond, |
653 const OperandARM32::ShiftKind Shift, const Operand *OpRd, | 688 const OperandARM32::ShiftKind Shift, const Operand *OpRd, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 740 |
706 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd, | 741 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd, |
707 const Operand *OpSn, const Operand *OpSm, | 742 const Operand *OpSn, const Operand *OpSm, |
708 const char *InstName); | 743 const char *InstName); |
709 }; | 744 }; |
710 | 745 |
711 } // end of namespace ARM32 | 746 } // end of namespace ARM32 |
712 } // end of namespace Ice | 747 } // end of namespace Ice |
713 | 748 |
714 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 749 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
OLD | NEW |