| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return false; | 954 return false; |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) { | 958 bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) { |
| 959 Label fall_through; | 959 Label fall_through; |
| 960 TestByteArrayGetIndex(assembler, &fall_through); | 960 TestByteArrayGetIndex(assembler, &fall_through); |
| 961 // R12: index as Smi. | 961 // R12: index as Smi. |
| 962 // RAX: array. | 962 // RAX: array. |
| 963 __ SmiUntag(R12); | 963 __ SmiUntag(R12); |
| 964 __ movq(RAX, FieldAddress(RAX, ExternalUint8Array::external_data_offset())); | 964 __ movq(RAX, FieldAddress(RAX, ExternalUint8Array::data_offset())); |
| 965 __ movq(RAX, Address(RAX, ExternalByteArrayData<uint8_t>::data_offset())); | |
| 966 __ movzxb(RAX, Address(RAX, R12, TIMES_1, 0)); | 965 __ movzxb(RAX, Address(RAX, R12, TIMES_1, 0)); |
| 967 __ SmiTag(RAX); | 966 __ SmiTag(RAX); |
| 968 __ ret(); | 967 __ ret(); |
| 969 __ Bind(&fall_through); | 968 __ Bind(&fall_through); |
| 970 return false; | 969 return false; |
| 971 } | 970 } |
| 972 | 971 |
| 973 | 972 |
| 974 // Tests if two top most arguments are smis, jumps to label not_smi if not. | 973 // Tests if two top most arguments are smis, jumps to label not_smi if not. |
| 975 // Topmost argument is in RAX. | 974 // Topmost argument is in RAX. |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 __ LoadObject(RAX, Bool::True()); | 1720 __ LoadObject(RAX, Bool::True()); |
| 1722 __ ret(); | 1721 __ ret(); |
| 1723 return true; | 1722 return true; |
| 1724 } | 1723 } |
| 1725 | 1724 |
| 1726 #undef __ | 1725 #undef __ |
| 1727 | 1726 |
| 1728 } // namespace dart | 1727 } // namespace dart |
| 1729 | 1728 |
| 1730 #endif // defined TARGET_ARCH_X64 | 1729 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |