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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 op | size | s | | 1545 op | size | s | |
1546 (static_cast<int32_t>(rd) << kRdShift) | | 1546 (static_cast<int32_t>(rd) << kRdShift) | |
1547 (static_cast<int32_t>(rn) << kRnShift) | | 1547 (static_cast<int32_t>(rn) << kRnShift) | |
1548 o.encoding(); | 1548 o.encoding(); |
1549 Emit(encoding); | 1549 Emit(encoding); |
1550 } | 1550 } |
1551 | 1551 |
1552 int32_t EncodeImm19BranchOffset(int64_t imm, int32_t instr) { | 1552 int32_t EncodeImm19BranchOffset(int64_t imm, int32_t instr) { |
1553 if (!CanEncodeImm19BranchOffset(imm)) { | 1553 if (!CanEncodeImm19BranchOffset(imm)) { |
1554 ASSERT(!use_far_branches()); | 1554 ASSERT(!use_far_branches()); |
1555 Isolate::Current()->long_jump_base()->Jump( | 1555 Thread::Current()->long_jump_base()->Jump( |
1556 1, Object::branch_offset_error()); | 1556 1, Object::branch_offset_error()); |
1557 } | 1557 } |
1558 const int32_t imm32 = static_cast<int32_t>(imm); | 1558 const int32_t imm32 = static_cast<int32_t>(imm); |
1559 const int32_t off = (((imm32 >> 2) << kImm19Shift) & kImm19Mask); | 1559 const int32_t off = (((imm32 >> 2) << kImm19Shift) & kImm19Mask); |
1560 return (instr & ~kImm19Mask) | off; | 1560 return (instr & ~kImm19Mask) | off; |
1561 } | 1561 } |
1562 | 1562 |
1563 int64_t DecodeImm19BranchOffset(int32_t instr) { | 1563 int64_t DecodeImm19BranchOffset(int32_t instr) { |
1564 const int32_t off = (((instr & kImm19Mask) >> kImm19Shift) << 13) >> 11; | 1564 const int32_t off = (((instr & kImm19Mask) >> kImm19Shift) << 13) >> 11; |
1565 return static_cast<int64_t>(off); | 1565 return static_cast<int64_t>(off); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 Register value, | 1942 Register value, |
1943 Label* no_update); | 1943 Label* no_update); |
1944 | 1944 |
1945 DISALLOW_ALLOCATION(); | 1945 DISALLOW_ALLOCATION(); |
1946 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1946 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1947 }; | 1947 }; |
1948 | 1948 |
1949 } // namespace dart | 1949 } // namespace dart |
1950 | 1950 |
1951 #endif // VM_ASSEMBLER_ARM64_H_ | 1951 #endif // VM_ASSEMBLER_ARM64_H_ |
OLD | NEW |