| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/x87/lithium-codegen-x87.h" | 9 #include "src/x87/lithium-codegen-x87.h" |
| 10 #include "src/x87/lithium-gap-resolver-x87.h" | 10 #include "src/x87/lithium-gap-resolver-x87.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 Register dst = cgen_->ToRegister(destination); | 285 Register dst = cgen_->ToRegister(destination); |
| 286 Representation r = cgen_->IsSmi(constant_source) | 286 Representation r = cgen_->IsSmi(constant_source) |
| 287 ? Representation::Smi() : Representation::Integer32(); | 287 ? Representation::Smi() : Representation::Integer32(); |
| 288 if (cgen_->IsInteger32(constant_source)) { | 288 if (cgen_->IsInteger32(constant_source)) { |
| 289 __ Move(dst, cgen_->ToImmediate(constant_source, r)); | 289 __ Move(dst, cgen_->ToImmediate(constant_source, r)); |
| 290 } else { | 290 } else { |
| 291 __ LoadObject(dst, cgen_->ToHandle(constant_source)); | 291 __ LoadObject(dst, cgen_->ToHandle(constant_source)); |
| 292 } | 292 } |
| 293 } else if (destination->IsDoubleRegister()) { | 293 } else if (destination->IsDoubleRegister()) { |
| 294 double v = cgen_->ToDouble(constant_source); | 294 double v = cgen_->ToDouble(constant_source); |
| 295 uint64_t int_val = BitCast<uint64_t, double>(v); | 295 uint64_t int_val = bit_cast<uint64_t, double>(v); |
| 296 int32_t lower = static_cast<int32_t>(int_val); | 296 int32_t lower = static_cast<int32_t>(int_val); |
| 297 int32_t upper = static_cast<int32_t>(int_val >> kBitsPerInt); | 297 int32_t upper = static_cast<int32_t>(int_val >> kBitsPerInt); |
| 298 __ push(Immediate(upper)); | 298 __ push(Immediate(upper)); |
| 299 __ push(Immediate(lower)); | 299 __ push(Immediate(lower)); |
| 300 X87Register dst = cgen_->ToX87Register(destination); | 300 X87Register dst = cgen_->ToX87Register(destination); |
| 301 cgen_->X87Mov(dst, MemOperand(esp, 0)); | 301 cgen_->X87Mov(dst, MemOperand(esp, 0)); |
| 302 __ add(esp, Immediate(kDoubleSize)); | 302 __ add(esp, Immediate(kDoubleSize)); |
| 303 } else { | 303 } else { |
| 304 DCHECK(destination->IsStackSlot()); | 304 DCHECK(destination->IsStackSlot()); |
| 305 Operand dst = cgen_->ToOperand(destination); | 305 Operand dst = cgen_->ToOperand(destination); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 } else if (destination->IsRegister()) { | 436 } else if (destination->IsRegister()) { |
| 437 source_uses_[destination->index()] = CountSourceUses(destination); | 437 source_uses_[destination->index()] = CountSourceUses(destination); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 | 440 |
| 441 #undef __ | 441 #undef __ |
| 442 | 442 |
| 443 } } // namespace v8::internal | 443 } } // namespace v8::internal |
| 444 | 444 |
| 445 #endif // V8_TARGET_ARCH_X87 | 445 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |