diff options
author | Milad Farazmand <miladfar@ca.ibm.com> | 2020-09-03 21:41:13 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-09-05 23:49:09 +0300 |
commit | b460c5c5240f5c1cb34fea6eea088e882a2dd802 (patch) | |
tree | 3a8060189b7d67da9fc32b21bc4347398dcfba3d /deps | |
parent | 3268a9fcaa97c4b378188ebbb280bf02f796a226 (diff) |
deps: V8: backport 3f071e3e7e15
Original commit message:
PPC: Optimize clearing higher bits of mulhw/mulhwu
Change-Id: Ie3e14a6ef4531349e81a8ae741bc7470c7e547ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349468
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69343}
Refs: https://github.com/v8/v8/commit/3f071e3e7e15af187267af6c3b369029e27c8cf5
PR-URL: https://github.com/nodejs/node/pull/35036
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ash Cripps <ashley.cripps@ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc index b7fece3f72d..74e16a20732 100644 --- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc +++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc @@ -1515,12 +1515,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( } break; case kPPC_MulHigh32: - __ mulhw(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1), - i.OutputRCBit()); + __ mulhw(r0, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit()); + // High 32 bits are undefined and need to be cleared. + __ clrldi(i.OutputRegister(), r0, Operand(32)); break; case kPPC_MulHighU32: - __ mulhwu(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1), - i.OutputRCBit()); + __ mulhwu(r0, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit()); + // High 32 bits are undefined and need to be cleared. + __ clrldi(i.OutputRegister(), r0, Operand(32)); break; case kPPC_MulDouble: ASSEMBLE_FLOAT_BINOP_RC(fmul, MiscField::decode(instr->opcode())); |