Chromium Code Reviews| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
| (...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2560 const int32_t offset = | 2560 const int32_t offset = |
| 2561 Array::element_offset(FindObject(object, kNotPatchable)); | 2561 Array::element_offset(FindObject(object, kNotPatchable)); |
| 2562 cmpq(reg, Address(pp, offset-kHeapObjectTag)); | 2562 cmpq(reg, Address(pp, offset-kHeapObjectTag)); |
| 2563 } else { | 2563 } else { |
| 2564 CompareImmediate( | 2564 CompareImmediate( |
| 2565 reg, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); | 2565 reg, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); |
| 2566 } | 2566 } |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 | 2569 |
| 2570 void Assembler::LoadDoubleConstant(XmmRegister dst, double value, Register pp) { | |
| 2571 const int32_t offset = FindImmediate(*reinterpret_cast<int64_t*>(&value)); | |
|
zra
2014/05/01 20:41:19
See checks in CanLoadImmediateFromPool and the fix
srdjan
2014/05/01 21:14:13
Yes, removed, on ARM do it as previous without usi
| |
| 2572 movsd(dst, Address::AddressBaseImm32(pp, offset)); | |
| 2573 } | |
| 2574 | |
| 2575 | |
| 2570 intptr_t Assembler::FindImmediate(int64_t imm) { | 2576 intptr_t Assembler::FindImmediate(int64_t imm) { |
| 2571 ASSERT(Isolate::Current() != Dart::vm_isolate()); | 2577 ASSERT(Isolate::Current() != Dart::vm_isolate()); |
| 2572 ASSERT(!object_pool_.IsNull()); | 2578 ASSERT(!object_pool_.IsNull()); |
| 2573 const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(imm)); | 2579 const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(imm)); |
| 2574 return FindObject(smi, kNotPatchable); | 2580 return FindObject(smi, kNotPatchable); |
| 2575 } | 2581 } |
| 2576 | 2582 |
| 2577 | 2583 |
| 2578 bool Assembler::CanLoadImmediateFromPool(const Immediate& imm, Register pp) { | 2584 bool Assembler::CanLoadImmediateFromPool(const Immediate& imm, Register pp) { |
| 2579 return !imm.is_int32() && | 2585 return !imm.is_int32() && |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3268 | 3274 |
| 3269 | 3275 |
| 3270 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3276 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3271 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3277 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3272 return xmm_reg_names[reg]; | 3278 return xmm_reg_names[reg]; |
| 3273 } | 3279 } |
| 3274 | 3280 |
| 3275 } // namespace dart | 3281 } // namespace dart |
| 3276 | 3282 |
| 3277 #endif // defined TARGET_ARCH_X64 | 3283 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |