PPC: Sign-extended result in DoFlooringDivI/DoDivI on 64bit
result is sign-extended on 64bit for functions LCodeGen::DoFlooringDivI and LCodeGen::DoDivI R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com BUG= LOG=N Review-Url: https://codereview.chromium.org/2029273002 Cr-Commit-Position: refs/heads/master@{#36661}
This commit is contained in:
parent
2fd3f9d69b
commit
6f76cc567d
@ -1140,6 +1140,10 @@ void LCodeGen::DoDivI(LDivI* instr) {
|
||||
}
|
||||
}
|
||||
|
||||
#if V8_TARGET_ARCH_PPC64
|
||||
__ extsw(result, result);
|
||||
#endif
|
||||
|
||||
if (!hdiv->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) {
|
||||
// Deoptimize if remainder is not 0.
|
||||
Register scratch = scratch0();
|
||||
@ -1333,6 +1337,9 @@ void LCodeGen::DoFlooringDivI(LFlooringDivI* instr) {
|
||||
// We performed a truncating division. Correct the result.
|
||||
__ subi(result, result, Operand(1));
|
||||
__ bind(&done);
|
||||
#if V8_TARGET_ARCH_PPC64
|
||||
__ extsw(result, result);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user