Skip to content

Commit

Permalink
deps: V8: backport 3f071e3e7e15
Browse files Browse the repository at this point in the history
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: v8/v8@3f071e3

PR-URL: nodejs#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>
  • Loading branch information
Milad Farazmand authored and joesepi committed Oct 22, 2020
1 parent 32b9805 commit 9158a71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.14',
'v8_embedder_string': '-node.15',

##### V8 defaults for Node.js #####

Expand Down
10 changes: 6 additions & 4 deletions deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit 9158a71

Please sign in to comment.