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

Side by Side Diff: src/arm/lithium-arm.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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 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 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 LPower* result = new(zone()) LPower(left, right); 1717 LPower* result = new(zone()) LPower(left, right);
1718 return MarkAsCall(DefineFixedDouble(result, d3), 1718 return MarkAsCall(DefineFixedDouble(result, d3),
1719 instr, 1719 instr,
1720 CAN_DEOPTIMIZE_EAGERLY); 1720 CAN_DEOPTIMIZE_EAGERLY);
1721 } 1721 }
1722 1722
1723 1723
1724 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { 1724 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1725 ASSERT(instr->representation().IsDouble()); 1725 ASSERT(instr->representation().IsDouble());
1726 ASSERT(instr->global_object()->representation().IsTagged()); 1726 ASSERT(instr->global_object()->representation().IsTagged());
1727 LOperand* global_object = UseFixed(instr->global_object(), r0); 1727 LOperand* global_object = UseTempRegister(instr->global_object());
1728 LRandom* result = new(zone()) LRandom(global_object); 1728 LOperand* scratch = TempRegister();
1729 return MarkAsCall(DefineFixedDouble(result, d7), instr); 1729 LOperand* scratch2 = TempRegister();
1730 LOperand* scratch3 = TempRegister();
1731 LRandom* result = new(zone()) LRandom(
1732 global_object, scratch, scratch2, scratch3);
1733 return DefineFixedDouble(result, d7);
1730 } 1734 }
1731 1735
1732 1736
1733 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1737 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1734 ASSERT(instr->left()->representation().IsTagged()); 1738 ASSERT(instr->left()->representation().IsTagged());
1735 ASSERT(instr->right()->representation().IsTagged()); 1739 ASSERT(instr->right()->representation().IsTagged());
1736 LOperand* left = UseFixed(instr->left(), r1); 1740 LOperand* left = UseFixed(instr->left(), r1);
1737 LOperand* right = UseFixed(instr->right(), r0); 1741 LOperand* right = UseFixed(instr->right(), r0);
1738 LCmpT* result = new(zone()) LCmpT(left, right); 1742 LCmpT* result = new(zone()) LCmpT(left, right);
1739 return MarkAsCall(DefineFixed(result, r0), instr); 1743 return MarkAsCall(DefineFixed(result, r0), instr);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 2624
2621 2625
2622 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2626 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2623 LOperand* object = UseRegister(instr->object()); 2627 LOperand* object = UseRegister(instr->object());
2624 LOperand* index = UseRegister(instr->index()); 2628 LOperand* index = UseRegister(instr->index());
2625 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2629 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2626 } 2630 }
2627 2631
2628 2632
2629 } } // namespace v8::internal 2633 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698