OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_ASSEMBLER_ARM64_H_ | 5 #ifndef VM_ASSEMBLER_ARM64_H_ |
6 #define VM_ASSEMBLER_ARM64_H_ | 6 #define VM_ASSEMBLER_ARM64_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_arm64.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 Operand imm_op; | 466 Operand imm_op; |
467 const bool immok = Operand::IsImmLogical(imm, kXRegSizeInBits, &imm_op); | 467 const bool immok = Operand::IsImmLogical(imm, kXRegSizeInBits, &imm_op); |
468 ASSERT(immok); | 468 ASSERT(immok); |
469 EmitLogicalImmOp(ANDIS, rd, rn, imm_op, kDoubleWord); | 469 EmitLogicalImmOp(ANDIS, rd, rn, imm_op, kDoubleWord); |
470 } | 470 } |
471 | 471 |
472 // Logical (shifted) register operations. | 472 // Logical (shifted) register operations. |
473 void and_(Register rd, Register rn, Operand o) { | 473 void and_(Register rd, Register rn, Operand o) { |
474 EmitLogicalShiftOp(AND, rd, rn, o, kDoubleWord); | 474 EmitLogicalShiftOp(AND, rd, rn, o, kDoubleWord); |
475 } | 475 } |
| 476 void andw_(Register rd, Register rn, Operand o) { |
| 477 EmitLogicalShiftOp(AND, rd, rn, o, kWord); |
| 478 } |
476 void bic(Register rd, Register rn, Operand o) { | 479 void bic(Register rd, Register rn, Operand o) { |
477 EmitLogicalShiftOp(BIC, rd, rn, o, kDoubleWord); | 480 EmitLogicalShiftOp(BIC, rd, rn, o, kDoubleWord); |
478 } | 481 } |
479 void orr(Register rd, Register rn, Operand o) { | 482 void orr(Register rd, Register rn, Operand o) { |
480 EmitLogicalShiftOp(ORR, rd, rn, o, kDoubleWord); | 483 EmitLogicalShiftOp(ORR, rd, rn, o, kDoubleWord); |
481 } | 484 } |
482 void orn(Register rd, Register rn, Operand o) { | 485 void orn(Register rd, Register rn, Operand o) { |
483 EmitLogicalShiftOp(ORN, rd, rn, o, kDoubleWord); | 486 EmitLogicalShiftOp(ORN, rd, rn, o, kDoubleWord); |
484 } | 487 } |
485 void eor(Register rd, Register rn, Operand o) { | 488 void eor(Register rd, Register rn, Operand o) { |
486 EmitLogicalShiftOp(EOR, rd, rn, o, kDoubleWord); | 489 EmitLogicalShiftOp(EOR, rd, rn, o, kDoubleWord); |
487 } | 490 } |
| 491 void eorw(Register rd, Register rn, Operand o) { |
| 492 EmitLogicalShiftOp(EOR, rd, rn, o, kWord); |
| 493 } |
488 void eon(Register rd, Register rn, Operand o) { | 494 void eon(Register rd, Register rn, Operand o) { |
489 EmitLogicalShiftOp(EON, rd, rn, o, kDoubleWord); | 495 EmitLogicalShiftOp(EON, rd, rn, o, kDoubleWord); |
490 } | 496 } |
491 void ands(Register rd, Register rn, Operand o) { | 497 void ands(Register rd, Register rn, Operand o) { |
492 EmitLogicalShiftOp(ANDS, rd, rn, o, kDoubleWord); | 498 EmitLogicalShiftOp(ANDS, rd, rn, o, kDoubleWord); |
493 } | 499 } |
494 void bics(Register rd, Register rn, Operand o) { | 500 void bics(Register rd, Register rn, Operand o) { |
495 EmitLogicalShiftOp(BICS, rd, rn, o, kDoubleWord); | 501 EmitLogicalShiftOp(BICS, rd, rn, o, kDoubleWord); |
496 } | 502 } |
497 | 503 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 void tst(Register rn, Operand o) { | 779 void tst(Register rn, Operand o) { |
774 ands(ZR, rn, o); | 780 ands(ZR, rn, o); |
775 } | 781 } |
776 void tsti(Register rn, uint64_t imm) { | 782 void tsti(Register rn, uint64_t imm) { |
777 andis(ZR, rn, imm); | 783 andis(ZR, rn, imm); |
778 } | 784 } |
779 | 785 |
780 void Lsl(Register rd, Register rn, int shift) { | 786 void Lsl(Register rd, Register rn, int shift) { |
781 add(rd, ZR, Operand(rn, LSL, shift)); | 787 add(rd, ZR, Operand(rn, LSL, shift)); |
782 } | 788 } |
| 789 void Lslw(Register rd, Register rn, int shift) { |
| 790 addw(rd, ZR, Operand(rn, LSL, shift)); |
| 791 } |
783 void Lsr(Register rd, Register rn, int shift) { | 792 void Lsr(Register rd, Register rn, int shift) { |
784 add(rd, ZR, Operand(rn, LSR, shift)); | 793 add(rd, ZR, Operand(rn, LSR, shift)); |
785 } | 794 } |
| 795 void Lsrw(Register rd, Register rn, int shift) { |
| 796 ASSERT((shift >= 0) && (shift < 32)); |
| 797 addw(rd, ZR, Operand(rn, LSR, shift)); |
| 798 } |
786 void Asr(Register rd, Register rn, int shift) { | 799 void Asr(Register rd, Register rn, int shift) { |
787 add(rd, ZR, Operand(rn, ASR, shift)); | 800 add(rd, ZR, Operand(rn, ASR, shift)); |
788 } | 801 } |
789 | 802 |
790 void SmiUntag(Register reg) { | 803 void SmiUntag(Register reg) { |
791 Asr(reg, reg, kSmiTagSize); | 804 Asr(reg, reg, kSmiTagSize); |
792 } | 805 } |
793 void SmiTag(Register reg) { | 806 void SmiTag(Register reg) { |
794 Lsl(reg, reg, kSmiTagSize); | 807 Lsl(reg, reg, kSmiTagSize); |
795 } | 808 } |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 Register value, | 1412 Register value, |
1400 Label* no_update); | 1413 Label* no_update); |
1401 | 1414 |
1402 DISALLOW_ALLOCATION(); | 1415 DISALLOW_ALLOCATION(); |
1403 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1416 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1404 }; | 1417 }; |
1405 | 1418 |
1406 } // namespace dart | 1419 } // namespace dart |
1407 | 1420 |
1408 #endif // VM_ASSEMBLER_ARM64_H_ | 1421 #endif // VM_ASSEMBLER_ARM64_H_ |
OLD | NEW |