Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/x64/lithium-codegen-x64.h" | 9 #include "src/x64/lithium-codegen-x64.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 | 268 |
| 269 | 269 |
| 270 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { | 270 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { |
| 271 if (FLAG_debug_code && FLAG_enable_slow_asserts && instr->HasResult() && | 271 if (FLAG_debug_code && FLAG_enable_slow_asserts && instr->HasResult() && |
| 272 instr->hydrogen_value()->representation().IsInteger32() && | 272 instr->hydrogen_value()->representation().IsInteger32() && |
| 273 instr->result()->IsRegister()) { | 273 instr->result()->IsRegister()) { |
| 274 __ AssertZeroExtended(ToRegister(instr->result())); | 274 __ AssertZeroExtended(ToRegister(instr->result())); |
| 275 } | 275 } |
| 276 | 276 |
| 277 if (instr->HasResult() && instr->MustSignExtendResult(chunk())) { | 277 if (instr->HasResult() && instr->MustSignExtendResult(chunk())) { |
| 278 ASSERT(kPointerSize == kInt64Size); | |
|
Jakob Kummerow
2014/06/10 12:01:17
Please use STATIC_ASSERT when you can.
haitao.feng
2014/06/11 02:44:22
Done.
| |
| 278 if (instr->result()->IsRegister()) { | 279 if (instr->result()->IsRegister()) { |
| 279 Register result_reg = ToRegister(instr->result()); | 280 Register result_reg = ToRegister(instr->result()); |
| 280 __ movsxlq(result_reg, result_reg); | 281 __ movsxlq(result_reg, result_reg); |
| 281 } else { | 282 } else { |
| 282 // Sign extend the 32bit result in the stack slots. | 283 // Sign extend the 32bit result in the stack slots. |
| 283 ASSERT(instr->result()->IsStackSlot()); | 284 ASSERT(instr->result()->IsStackSlot()); |
| 284 Operand src = ToOperand(instr->result()); | 285 Operand src = ToOperand(instr->result()); |
| 285 __ movsxlq(kScratchRegister, src); | 286 __ movsxlq(kScratchRegister, src); |
| 286 __ movq(src, kScratchRegister); | 287 __ movq(src, kScratchRegister); |
| 287 } | 288 } |
| (...skipping 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5735 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5736 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
| 5736 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5737 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5737 } | 5738 } |
| 5738 | 5739 |
| 5739 | 5740 |
| 5740 #undef __ | 5741 #undef __ |
| 5741 | 5742 |
| 5742 } } // namespace v8::internal | 5743 } } // namespace v8::internal |
| 5743 | 5744 |
| 5744 #endif // V8_TARGET_ARCH_X64 | 5745 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |