| 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 13 matching lines...) Expand all Loading... |
| 24 // if the intrinsified method always executes a return. | 24 // if the intrinsified method always executes a return. |
| 25 // The RBP register should not be modified, because it is used by the profiler. | 25 // The RBP register should not be modified, because it is used by the profiler. |
| 26 // The PP and THR registers (see constants_x64.h) must be preserved. | 26 // The PP and THR registers (see constants_x64.h) must be preserved. |
| 27 | 27 |
| 28 #define __ assembler-> | 28 #define __ assembler-> |
| 29 | 29 |
| 30 | 30 |
| 31 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } | 31 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } |
| 32 | 32 |
| 33 | 33 |
| 34 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { |
| 35 assembler->Comment("IntrinsicCallPrologue"); |
| 36 assembler->movq(CALLEE_SAVED_TEMP, R10); |
| 37 } |
| 38 |
| 39 |
| 40 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
| 41 assembler->Comment("IntrinsicCallEpilogue"); |
| 42 assembler->movq(R10, CALLEE_SAVED_TEMP); |
| 43 } |
| 44 |
| 45 |
| 34 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { | 46 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { |
| 35 if (Isolate::Current()->type_checks()) { | 47 if (Isolate::Current()->type_checks()) { |
| 36 return; | 48 return; |
| 37 } | 49 } |
| 38 | 50 |
| 39 Label fall_through; | 51 Label fall_through; |
| 40 __ movq(RDX, Address(RSP, + 1 * kWordSize)); // Value. | 52 __ movq(RDX, Address(RSP, + 1 * kWordSize)); // Value. |
| 41 __ movq(RCX, Address(RSP, + 2 * kWordSize)); // Index. | 53 __ movq(RCX, Address(RSP, + 2 * kWordSize)); // Index. |
| 42 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array. | 54 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array. |
| 43 __ testq(RCX, Immediate(kSmiTagMask)); | 55 __ testq(RCX, Immediate(kSmiTagMask)); |
| (...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 __ LoadIsolate(RAX); | 2117 __ LoadIsolate(RAX); |
| 2106 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); | 2118 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); |
| 2107 __ ret(); | 2119 __ ret(); |
| 2108 } | 2120 } |
| 2109 | 2121 |
| 2110 #undef __ | 2122 #undef __ |
| 2111 | 2123 |
| 2112 } // namespace dart | 2124 } // namespace dart |
| 2113 | 2125 |
| 2114 #endif // defined TARGET_ARCH_X64 | 2126 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |