| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 348 |
| 349 | 349 |
| 350 // Set data of growable object array. | 350 // Set data of growable object array. |
| 351 // On stack: growable array (+2), data (+1), return-address (+0). | 351 // On stack: growable array (+2), data (+1), return-address (+0). |
| 352 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { | 352 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { |
| 353 if (FLAG_enable_type_checks) { | 353 if (FLAG_enable_type_checks) { |
| 354 return false; | 354 return false; |
| 355 } | 355 } |
| 356 __ movq(RAX, Address(RSP, + 2 * kWordSize)); | 356 __ movq(RAX, Address(RSP, + 2 * kWordSize)); |
| 357 __ movq(RBX, Address(RSP, + 1 * kWordSize)); | 357 __ movq(RBX, Address(RSP, + 1 * kWordSize)); |
| 358 __ movq(FieldAddress(RAX, GrowableObjectArray::data_offset()), RBX); | 358 __ StoreIntoObject(RAX, |
| 359 FieldAddress(RAX, GrowableObjectArray::data_offset()), |
| 360 RBX); |
| 359 __ ret(); | 361 __ ret(); |
| 360 return true; | 362 return true; |
| 361 } | 363 } |
| 362 | 364 |
| 363 | 365 |
| 364 bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) { | 366 bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) { |
| 365 __ movq(RAX, Address(RSP, + 1 * kWordSize)); | 367 __ movq(RAX, Address(RSP, + 1 * kWordSize)); |
| 366 __ movq(RAX, FieldAddress(RAX, ByteArray::length_offset())); | 368 __ movq(RAX, FieldAddress(RAX, ByteArray::length_offset())); |
| 367 __ ret(); | 369 __ ret(); |
| 368 // Generate enough code to satisfy patchability constraint. | 370 // Generate enough code to satisfy patchability constraint. |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 __ LoadObject(RAX, bool_true); | 1320 __ LoadObject(RAX, bool_true); |
| 1319 __ ret(); | 1321 __ ret(); |
| 1320 return true; | 1322 return true; |
| 1321 } | 1323 } |
| 1322 | 1324 |
| 1323 #undef __ | 1325 #undef __ |
| 1324 | 1326 |
| 1325 } // namespace dart | 1327 } // namespace dart |
| 1326 | 1328 |
| 1327 #endif // defined TARGET_ARCH_X64 | 1329 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |