| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
| 6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 void cmn(Register rn, ShifterOperand so, Condition cond = AL); | 376 void cmn(Register rn, ShifterOperand so, Condition cond = AL); |
| 377 | 377 |
| 378 void orr(Register rd, Register rn, ShifterOperand so, Condition cond = AL); | 378 void orr(Register rd, Register rn, ShifterOperand so, Condition cond = AL); |
| 379 void orrs(Register rd, Register rn, ShifterOperand so, Condition cond = AL); | 379 void orrs(Register rd, Register rn, ShifterOperand so, Condition cond = AL); |
| 380 | 380 |
| 381 void mov(Register rd, ShifterOperand so, Condition cond = AL); | 381 void mov(Register rd, ShifterOperand so, Condition cond = AL); |
| 382 void movs(Register rd, ShifterOperand so, Condition cond = AL); | 382 void movs(Register rd, ShifterOperand so, Condition cond = AL); |
| 383 | 383 |
| 384 void bic(Register rd, Register rn, ShifterOperand so, Condition cond = AL); | 384 void bic(Register rd, Register rn, ShifterOperand so, Condition cond = AL); |
| 385 void bics(Register rd, Register rn, ShifterOperand so, Condition cond = AL); |
| 385 | 386 |
| 386 void mvn(Register rd, ShifterOperand so, Condition cond = AL); | 387 void mvn(Register rd, ShifterOperand so, Condition cond = AL); |
| 387 void mvns(Register rd, ShifterOperand so, Condition cond = AL); | 388 void mvns(Register rd, ShifterOperand so, Condition cond = AL); |
| 388 | 389 |
| 389 // Miscellaneous data-processing instructions. | 390 // Miscellaneous data-processing instructions. |
| 390 void clz(Register rd, Register rm, Condition cond = AL); | 391 void clz(Register rd, Register rm, Condition cond = AL); |
| 391 void movw(Register rd, uint16_t imm16, Condition cond = AL); | 392 void movw(Register rd, uint16_t imm16, Condition cond = AL); |
| 392 void movt(Register rd, uint16_t imm16, Condition cond = AL); | 393 void movt(Register rd, uint16_t imm16, Condition cond = AL); |
| 393 | 394 |
| 394 // Multiply instructions. | 395 // Multiply instructions. |
| 395 void mul(Register rd, Register rn, Register rm, Condition cond = AL); | 396 void mul(Register rd, Register rn, Register rm, Condition cond = AL); |
| 396 void muls(Register rd, Register rn, Register rm, Condition cond = AL); | 397 void muls(Register rd, Register rn, Register rm, Condition cond = AL); |
| 397 void mla(Register rd, Register rn, Register rm, Register ra, | 398 void mla(Register rd, Register rn, Register rm, Register ra, |
| 398 Condition cond = AL); | 399 Condition cond = AL); |
| 399 void mls(Register rd, Register rn, Register rm, Register ra, | 400 void mls(Register rd, Register rn, Register rm, Register ra, |
| 400 Condition cond = AL); | 401 Condition cond = AL); |
| 401 void smull(Register rd_lo, Register rd_hi, Register rn, Register rm, | 402 void smull(Register rd_lo, Register rd_hi, Register rn, Register rm, |
| 402 Condition cond = AL); | 403 Condition cond = AL); |
| 403 void umull(Register rd_lo, Register rd_hi, Register rn, Register rm, | 404 void umull(Register rd_lo, Register rd_hi, Register rn, Register rm, |
| 404 Condition cond = AL); | 405 Condition cond = AL); |
| 406 void smlal(Register rd_lo, Register rd_hi, Register rn, Register rm, |
| 407 Condition cond = AL); |
| 405 | 408 |
| 406 // Division instructions. | 409 // Division instructions. |
| 407 void sdiv(Register rd, Register rn, Register rm, Condition cond = AL); | 410 void sdiv(Register rd, Register rn, Register rm, Condition cond = AL); |
| 408 void udiv(Register rd, Register rn, Register rm, Condition cond = AL); | 411 void udiv(Register rd, Register rn, Register rm, Condition cond = AL); |
| 409 | 412 |
| 410 // Load/store instructions. | 413 // Load/store instructions. |
| 411 void ldr(Register rd, Address ad, Condition cond = AL); | 414 void ldr(Register rd, Address ad, Condition cond = AL); |
| 412 void str(Register rd, Address ad, Condition cond = AL); | 415 void str(Register rd, Address ad, Condition cond = AL); |
| 413 | 416 |
| 414 void ldrb(Register rd, Address ad, Condition cond = AL); | 417 void ldrb(Register rd, Address ad, Condition cond = AL); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // to set up the frame and save a PC which can be used to figure out the | 664 // to set up the frame and save a PC which can be used to figure out the |
| 662 // RawInstruction object corresponding to the code running in the frame. | 665 // RawInstruction object corresponding to the code running in the frame. |
| 663 static const intptr_t kEntryPointToPcMarkerOffset = Instr::kPCReadOffset; | 666 static const intptr_t kEntryPointToPcMarkerOffset = Instr::kPCReadOffset; |
| 664 | 667 |
| 665 // Inlined allocation of an instance of class 'cls', code has no runtime | 668 // Inlined allocation of an instance of class 'cls', code has no runtime |
| 666 // calls. Jump to 'failure' if the instance cannot be allocated here. | 669 // calls. Jump to 'failure' if the instance cannot be allocated here. |
| 667 // Allocated instance is returned in 'instance_reg'. | 670 // Allocated instance is returned in 'instance_reg'. |
| 668 // Only the tags field of the object is initialized. | 671 // Only the tags field of the object is initialized. |
| 669 void TryAllocate(const Class& cls, | 672 void TryAllocate(const Class& cls, |
| 670 Label* failure, | 673 Label* failure, |
| 671 bool near_jump, | |
| 672 Register instance_reg); | 674 Register instance_reg); |
| 673 | 675 |
| 674 // Emit data (e.g encoded instruction or immediate) in instruction stream. | 676 // Emit data (e.g encoded instruction or immediate) in instruction stream. |
| 675 void Emit(int32_t value); | 677 void Emit(int32_t value); |
| 676 | 678 |
| 677 private: | 679 private: |
| 678 AssemblerBuffer buffer_; // Contains position independent code. | 680 AssemblerBuffer buffer_; // Contains position independent code. |
| 679 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. | 681 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
| 680 int32_t prologue_offset_; | 682 int32_t prologue_offset_; |
| 681 | 683 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 Register value, | 802 Register value, |
| 801 Label* no_update); | 803 Label* no_update); |
| 802 | 804 |
| 803 DISALLOW_ALLOCATION(); | 805 DISALLOW_ALLOCATION(); |
| 804 DISALLOW_COPY_AND_ASSIGN(Assembler); | 806 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 805 }; | 807 }; |
| 806 | 808 |
| 807 } // namespace dart | 809 } // namespace dart |
| 808 | 810 |
| 809 #endif // VM_ASSEMBLER_ARM_H_ | 811 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |