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

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

Issue 23478031: Improve code generation for the HRandom instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. Created 7 years, 3 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/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); 1606 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx);
1607 LPower* result = new(zone()) LPower(left, right); 1607 LPower* result = new(zone()) LPower(left, right);
1608 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1608 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1609 CAN_DEOPTIMIZE_EAGERLY); 1609 CAN_DEOPTIMIZE_EAGERLY);
1610 } 1610 }
1611 1611
1612 1612
1613 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { 1613 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1614 ASSERT(instr->representation().IsDouble()); 1614 ASSERT(instr->representation().IsDouble());
1615 ASSERT(instr->global_object()->representation().IsTagged()); 1615 ASSERT(instr->global_object()->representation().IsTagged());
1616 LOperand* global_object = UseFixed(instr->global_object(), arg_reg_1); 1616 LOperand* global_object = UseTempRegister(instr->global_object());
1617 LRandom* result = new(zone()) LRandom(global_object); 1617 LOperand* scratch = TempRegister();
1618 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); 1618 LOperand* scratch2 = TempRegister();
1619 LOperand* scratch3 = TempRegister();
1620 LRandom* result = new(zone()) LRandom(
1621 global_object, scratch, scratch2, scratch3);
1622 return DefineFixedDouble(result, xmm1);
1619 } 1623 }
1620 1624
1621 1625
1622 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1626 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1623 ASSERT(instr->left()->representation().IsTagged()); 1627 ASSERT(instr->left()->representation().IsTagged());
1624 ASSERT(instr->right()->representation().IsTagged()); 1628 ASSERT(instr->right()->representation().IsTagged());
1625 LOperand* left = UseFixed(instr->left(), rdx); 1629 LOperand* left = UseFixed(instr->left(), rdx);
1626 LOperand* right = UseFixed(instr->right(), rax); 1630 LOperand* right = UseFixed(instr->right(), rax);
1627 LCmpT* result = new(zone()) LCmpT(left, right); 1631 LCmpT* result = new(zone()) LCmpT(left, right);
1628 return MarkAsCall(DefineFixed(result, rax), instr); 1632 return MarkAsCall(DefineFixed(result, rax), instr);
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2548 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2545 LOperand* object = UseRegister(instr->object()); 2549 LOperand* object = UseRegister(instr->object());
2546 LOperand* index = UseTempRegister(instr->index()); 2550 LOperand* index = UseTempRegister(instr->index());
2547 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2551 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2548 } 2552 }
2549 2553
2550 2554
2551 } } // namespace v8::internal 2555 } } // namespace v8::internal
2552 2556
2553 #endif // V8_TARGET_ARCH_X64 2557 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698