Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1287)

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 328553005: Sign extend the dehoisted key at the definition point for x64 port only; for x32 port, we need to si (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Jakob's comment Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // We sign extend the dehoisted key at the definition point when the pointer
279 // size is 64-bit. For x32 port, we sign extend the dehoisted key at the use
280 // points and MustSignExtendResult is always false. We can't use
281 // STATIC_ASSERT here as the pointer size is 32-bit for x32.
282 ASSERT(kPointerSize == kInt64Size);
278 if (instr->result()->IsRegister()) { 283 if (instr->result()->IsRegister()) {
279 Register result_reg = ToRegister(instr->result()); 284 Register result_reg = ToRegister(instr->result());
280 __ movsxlq(result_reg, result_reg); 285 __ movsxlq(result_reg, result_reg);
281 } else { 286 } else {
282 // Sign extend the 32bit result in the stack slots. 287 // Sign extend the 32bit result in the stack slots.
283 ASSERT(instr->result()->IsStackSlot()); 288 ASSERT(instr->result()->IsStackSlot());
284 Operand src = ToOperand(instr->result()); 289 Operand src = ToOperand(instr->result());
285 __ movsxlq(kScratchRegister, src); 290 __ movsxlq(kScratchRegister, src);
286 __ movq(src, kScratchRegister); 291 __ movq(src, kScratchRegister);
287 } 292 }
(...skipping 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5735 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 5740 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
5736 RecordSafepoint(Safepoint::kNoLazyDeopt); 5741 RecordSafepoint(Safepoint::kNoLazyDeopt);
5737 } 5742 }
5738 5743
5739 5744
5740 #undef __ 5745 #undef __
5741 5746
5742 } } // namespace v8::internal 5747 } } // namespace v8::internal
5743 5748
5744 #endif // V8_TARGET_ARCH_X64 5749 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698