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

Side by Side Diff: src/ia32/lithium-ia32.h

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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 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 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 } 1455 }
1456 1456
1457 LOperand* left() { return inputs_[0]; } 1457 LOperand* left() { return inputs_[0]; }
1458 LOperand* right() { return inputs_[1]; } 1458 LOperand* right() { return inputs_[1]; }
1459 1459
1460 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 1460 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1461 DECLARE_HYDROGEN_ACCESSOR(Power) 1461 DECLARE_HYDROGEN_ACCESSOR(Power)
1462 }; 1462 };
1463 1463
1464 1464
1465 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1465 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 3> {
1466 public: 1466 public:
1467 explicit LRandom(LOperand* global_object) { 1467 LRandom(LOperand* global_object,
1468 LOperand* scratch,
1469 LOperand* scratch2,
1470 LOperand* scratch3) {
1468 inputs_[0] = global_object; 1471 inputs_[0] = global_object;
1472 temps_[0] = scratch;
1473 temps_[1] = scratch2;
1474 temps_[2] = scratch3;
1469 } 1475 }
1470 1476
1471 LOperand* global_object() { return inputs_[0]; } 1477 LOperand* global_object() const { return inputs_[0]; }
1478 LOperand* scratch() const { return temps_[0]; }
1479 LOperand* scratch2() const { return temps_[1]; }
1480 LOperand* scratch3() const { return temps_[2]; }
1472 1481
1473 DECLARE_CONCRETE_INSTRUCTION(Random, "random") 1482 DECLARE_CONCRETE_INSTRUCTION(Random, "random")
1474 DECLARE_HYDROGEN_ACCESSOR(Random) 1483 DECLARE_HYDROGEN_ACCESSOR(Random)
1475 }; 1484 };
1476 1485
1477 1486
1478 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1487 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1479 public: 1488 public:
1480 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1489 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1481 : op_(op) { 1490 : op_(op) {
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 2927
2919 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2928 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2920 }; 2929 };
2921 2930
2922 #undef DECLARE_HYDROGEN_ACCESSOR 2931 #undef DECLARE_HYDROGEN_ACCESSOR
2923 #undef DECLARE_CONCRETE_INSTRUCTION 2932 #undef DECLARE_CONCRETE_INSTRUCTION
2924 2933
2925 } } // namespace v8::internal 2934 } } // namespace v8::internal
2926 2935
2927 #endif // V8_IA32_LITHIUM_IA32_H_ 2936 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698