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

Unified Diff: src/compiler/ppc/code-generator-ppc.cc

Issue 2152363002: PPC: [turbofan] Introduce integer multiplication with overflow. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed mullw instruction as suggested Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-codes-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ppc/code-generator-ppc.cc
diff --git a/src/compiler/ppc/code-generator-ppc.cc b/src/compiler/ppc/code-generator-ppc.cc
index 6da65c348559667fd14461b08a4667e5b1178570..2f70dd28da028a9c00808ad40dd12809e661a2f6 100644
--- a/src/compiler/ppc/code-generator-ppc.cc
+++ b/src/compiler/ppc/code-generator-ppc.cc
@@ -975,6 +975,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kArchPrepareTailCall:
AssemblePrepareTailCall();
break;
+ case kArchComment: {
+ Address comment_string = i.InputExternalReference(0).address();
+ __ RecordComment(reinterpret_cast<const char*>(comment_string));
+ break;
+ }
case kArchCallCFunction: {
int const num_parameters = MiscField::decode(instr->opcode());
if (instr->InputAt(0)->IsImmediate()) {
@@ -1300,6 +1305,24 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
LeaveOE, i.OutputRCBit());
break;
#endif
+
+ case kPPC_Mul32WithHigh32:
+ if (i.OutputRegister(0).is(i.InputRegister(0)) ||
+ i.OutputRegister(0).is(i.InputRegister(1)) ||
+ i.OutputRegister(1).is(i.InputRegister(0)) ||
+ i.OutputRegister(1).is(i.InputRegister(1))) {
+ __ mullw(kScratchReg,
+ i.InputRegister(0), i.InputRegister(1)); // low
+ __ mulhw(i.OutputRegister(1),
+ i.InputRegister(0), i.InputRegister(1)); // high
+ __ mr(i.OutputRegister(0), kScratchReg);
+ } else {
+ __ mullw(i.OutputRegister(0),
+ i.InputRegister(0), i.InputRegister(1)); // low
+ __ mulhw(i.OutputRegister(1),
+ i.InputRegister(0), i.InputRegister(1)); // high
+ }
+ break;
case kPPC_MulHigh32:
__ mulhw(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1),
i.OutputRCBit());
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-codes-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698