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

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

Issue 23851028: MIPS: Improve code generation for the HRandom instruction. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 } 1437 }
1438 1438
1439 LOperand* left() { return inputs_[0]; } 1439 LOperand* left() { return inputs_[0]; }
1440 LOperand* right() { return inputs_[1]; } 1440 LOperand* right() { return inputs_[1]; }
1441 1441
1442 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 1442 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1443 DECLARE_HYDROGEN_ACCESSOR(Power) 1443 DECLARE_HYDROGEN_ACCESSOR(Power)
1444 }; 1444 };
1445 1445
1446 1446
1447 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1447 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 3> {
1448 public: 1448 public:
1449 explicit LRandom(LOperand* global_object) { 1449 LRandom(LOperand* global_object,
1450 LOperand* scratch,
1451 LOperand* scratch2,
1452 LOperand* scratch3) {
1450 inputs_[0] = global_object; 1453 inputs_[0] = global_object;
1454 temps_[0] = scratch;
1455 temps_[1] = scratch2;
1456 temps_[2] = scratch3;
1451 } 1457 }
1452 1458
1453 LOperand* global_object() { return inputs_[0]; } 1459 LOperand* global_object() const { return inputs_[0]; }
1460 LOperand* scratch() const { return temps_[0]; }
1461 LOperand* scratch2() const { return temps_[1]; }
1462 LOperand* scratch3() const { return temps_[2]; }
1454 1463
1455 DECLARE_CONCRETE_INSTRUCTION(Random, "random") 1464 DECLARE_CONCRETE_INSTRUCTION(Random, "random")
1456 DECLARE_HYDROGEN_ACCESSOR(Random) 1465 DECLARE_HYDROGEN_ACCESSOR(Random)
1457 }; 1466 };
1458 1467
1459 1468
1460 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1469 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1461 public: 1470 public:
1462 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1471 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1463 : op_(op) { 1472 : op_(op) {
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 2771
2763 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2772 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2764 }; 2773 };
2765 2774
2766 #undef DECLARE_HYDROGEN_ACCESSOR 2775 #undef DECLARE_HYDROGEN_ACCESSOR
2767 #undef DECLARE_CONCRETE_INSTRUCTION 2776 #undef DECLARE_CONCRETE_INSTRUCTION
2768 2777
2769 } } // namespace v8::internal 2778 } } // namespace v8::internal
2770 2779
2771 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2780 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698