| 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 a838ede47c37aff888b2ef033aa78d0ae9cc9e8b..d7232bf3f9f558badc48aa6a98c047086b029091 100644
|
| --- a/src/compiler/ppc/code-generator-ppc.cc
|
| +++ b/src/compiler/ppc/code-generator-ppc.cc
|
| @@ -263,7 +263,8 @@ Condition FlagsConditionToCondition(FlagsCondition condition, ArchOpcode op) {
|
| // Overflow checked for add/sub only.
|
| switch (op) {
|
| #if V8_TARGET_ARCH_PPC64
|
| - case kPPC_Add:
|
| + case kPPC_Add32:
|
| + case kPPC_Add64:
|
| case kPPC_Sub:
|
| #endif
|
| case kPPC_AddWithOverflow32:
|
| @@ -276,7 +277,8 @@ Condition FlagsConditionToCondition(FlagsCondition condition, ArchOpcode op) {
|
| case kNotOverflow:
|
| switch (op) {
|
| #if V8_TARGET_ARCH_PPC64
|
| - case kPPC_Add:
|
| + case kPPC_Add32:
|
| + case kPPC_Add64:
|
| case kPPC_Sub:
|
| #endif
|
| case kPPC_AddWithOverflow32:
|
| @@ -1322,7 +1324,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
| 63 - i.InputInt32(2), i.OutputRCBit());
|
| break;
|
| #endif
|
| - case kPPC_Add:
|
| + case kPPC_Add32:
|
| #if V8_TARGET_ARCH_PPC64
|
| if (FlagsModeField::decode(instr->opcode()) != kFlags_none) {
|
| ASSEMBLE_ADD_WITH_OVERFLOW();
|
| @@ -1335,10 +1337,26 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
| __ addi(i.OutputRegister(), i.InputRegister(0), i.InputImmediate(1));
|
| DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
| }
|
| + __ extsw(i.OutputRegister(), i.OutputRegister());
|
| #if V8_TARGET_ARCH_PPC64
|
| }
|
| #endif
|
| break;
|
| +#if V8_TARGET_ARCH_PPC64
|
| + case kPPC_Add64:
|
| + if (FlagsModeField::decode(instr->opcode()) != kFlags_none) {
|
| + ASSEMBLE_ADD_WITH_OVERFLOW();
|
| + } else {
|
| + if (HasRegisterInput(instr, 1)) {
|
| + __ add(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1),
|
| + LeaveOE, i.OutputRCBit());
|
| + } else {
|
| + __ addi(i.OutputRegister(), i.InputRegister(0), i.InputImmediate(1));
|
| + DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
| + }
|
| + }
|
| + break;
|
| +#endif
|
| case kPPC_AddWithOverflow32:
|
| ASSEMBLE_ADD_WITH_OVERFLOW32();
|
| break;
|
|
|