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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 __ cmpq(RDI, raw_null); | 337 __ cmpq(RDI, raw_null); |
338 __ j(EQUAL, is_instance_lbl); | 338 __ j(EQUAL, is_instance_lbl); |
339 const Type& object_type = Type::ZoneHandle(Type::ObjectType()); | 339 const Type& object_type = Type::ZoneHandle(Type::ObjectType()); |
340 __ CompareObject(RDI, object_type); | 340 __ CompareObject(RDI, object_type); |
341 __ j(EQUAL, is_instance_lbl); | 341 __ j(EQUAL, is_instance_lbl); |
342 | 342 |
343 // For Smi check quickly against int and num interfaces. | 343 // For Smi check quickly against int and num interfaces. |
344 Label not_smi; | 344 Label not_smi; |
345 __ testq(RAX, Immediate(kSmiTagMask)); // Value is Smi? | 345 __ testq(RAX, Immediate(kSmiTagMask)); // Value is Smi? |
346 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); | 346 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); |
347 __ CompareObject(RDI, Type::ZoneHandle(Type::IntInterface())); | 347 __ CompareObject(RDI, Type::ZoneHandle(Type::IntType())); |
348 __ j(EQUAL, is_instance_lbl); | 348 __ j(EQUAL, is_instance_lbl); |
349 __ CompareObject(RDI, Type::ZoneHandle(Type::Number())); | 349 __ CompareObject(RDI, Type::ZoneHandle(Type::Number())); |
350 __ j(EQUAL, is_instance_lbl); | 350 __ j(EQUAL, is_instance_lbl); |
351 // Smi must be handled in runtime. | 351 // Smi must be handled in runtime. |
352 __ jmp(&fall_through); | 352 __ jmp(&fall_through); |
353 | 353 |
354 __ Bind(¬_smi); | 354 __ Bind(¬_smi); |
355 // RDX: instantiator type arguments. | 355 // RDX: instantiator type arguments. |
356 // RAX: instance. | 356 // RAX: instance. |
357 const Register kInstanceReg = RAX; | 357 const Register kInstanceReg = RAX; |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1366 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1367 __ Exchange(mem1, mem2); | 1367 __ Exchange(mem1, mem2); |
1368 } | 1368 } |
1369 | 1369 |
1370 | 1370 |
1371 #undef __ | 1371 #undef __ |
1372 | 1372 |
1373 } // namespace dart | 1373 } // namespace dart |
1374 | 1374 |
1375 #endif // defined TARGET_ARCH_X64 | 1375 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |