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

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

Issue 293363005: LoadUint32() doesn't need a scratch register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compile fix Created 6 years, 7 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 | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/lithium-x64.h » ('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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "x64/lithium-codegen-x64.h" 9 #include "x64/lithium-codegen-x64.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 4513 matching lines...) Expand 10 before | Expand all | Expand 10 after
4524 __ Cvtlsi2sd(ToDoubleRegister(output), ToRegister(input)); 4524 __ Cvtlsi2sd(ToDoubleRegister(output), ToRegister(input));
4525 } else { 4525 } else {
4526 __ Cvtlsi2sd(ToDoubleRegister(output), ToOperand(input)); 4526 __ Cvtlsi2sd(ToDoubleRegister(output), ToOperand(input));
4527 } 4527 }
4528 } 4528 }
4529 4529
4530 4530
4531 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { 4531 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
4532 LOperand* input = instr->value(); 4532 LOperand* input = instr->value();
4533 LOperand* output = instr->result(); 4533 LOperand* output = instr->result();
4534 LOperand* temp = instr->temp();
4535 4534
4536 __ LoadUint32(ToDoubleRegister(output), 4535 __ LoadUint32(ToDoubleRegister(output), ToRegister(input));
4537 ToRegister(input),
4538 ToDoubleRegister(temp));
4539 } 4536 }
4540 4537
4541 4538
4542 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4539 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4543 LOperand* input = instr->value(); 4540 LOperand* input = instr->value();
4544 ASSERT(input->IsRegister() && input->Equals(instr->result())); 4541 ASSERT(input->IsRegister() && input->Equals(instr->result()));
4545 Register reg = ToRegister(input); 4542 Register reg = ToRegister(input);
4546 4543
4547 __ Integer32ToSmi(reg, reg); 4544 __ Integer32ToSmi(reg, reg);
4548 } 4545 }
(...skipping 26 matching lines...) Expand all
4575 4572
4576 void LCodeGen::DoDeferredNumberTagU(LNumberTagU* instr) { 4573 void LCodeGen::DoDeferredNumberTagU(LNumberTagU* instr) {
4577 Label done, slow; 4574 Label done, slow;
4578 Register reg = ToRegister(instr->value()); 4575 Register reg = ToRegister(instr->value());
4579 Register tmp = ToRegister(instr->temp1()); 4576 Register tmp = ToRegister(instr->temp1());
4580 XMMRegister temp_xmm = ToDoubleRegister(instr->temp2()); 4577 XMMRegister temp_xmm = ToDoubleRegister(instr->temp2());
4581 4578
4582 // Load value into temp_xmm which will be preserved across potential call to 4579 // Load value into temp_xmm which will be preserved across potential call to
4583 // runtime (MacroAssembler::EnterExitFrameEpilogue preserves only allocatable 4580 // runtime (MacroAssembler::EnterExitFrameEpilogue preserves only allocatable
4584 // XMM registers on x64). 4581 // XMM registers on x64).
4585 XMMRegister xmm_scratch = double_scratch0(); 4582 __ LoadUint32(temp_xmm, reg);
4586 __ LoadUint32(temp_xmm, reg, xmm_scratch);
4587 4583
4588 if (FLAG_inline_new) { 4584 if (FLAG_inline_new) {
4589 __ AllocateHeapNumber(reg, tmp, &slow); 4585 __ AllocateHeapNumber(reg, tmp, &slow);
4590 __ jmp(&done, Label::kNear); 4586 __ jmp(&done, Label::kNear);
4591 } 4587 }
4592 4588
4593 // Slow case: Call the runtime system to do the number allocation. 4589 // Slow case: Call the runtime system to do the number allocation.
4594 __ bind(&slow); 4590 __ bind(&slow);
4595 { 4591 {
4596 // Put a valid pointer value in the stack slot where the result 4592 // Put a valid pointer value in the stack slot where the result
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5700 __ bind(deferred->exit()); 5696 __ bind(deferred->exit());
5701 __ bind(&done); 5697 __ bind(&done);
5702 } 5698 }
5703 5699
5704 5700
5705 #undef __ 5701 #undef __
5706 5702
5707 } } // namespace v8::internal 5703 } } // namespace v8::internal
5708 5704
5709 #endif // V8_TARGET_ARCH_X64 5705 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698