Commit 960e25ea authored by bryleun's avatar bryleun Committed by Commit bot

S390: Overflow check assert expanded to include kS390_Add/kS390_Sub

Debug asserts in code-generator-s390.cc are in place to ensure that overflow is only set when dealing with a sub or add opcode. However, the check only looked for kS390_Add/SubWithOverflow32, not kS390_Add/Sub which also sets overflow. This CL adds the second case to this assert check.

R=michael_dawson@ca.ibm.com,jyan@ca.ibm.com,mtbrandyberry@ca.ibm.com,joransiu@ca.ibm.com

BUG=

Review URL: https://codereview.chromium.org/1863983003

Cr-Commit-Position: refs/heads/master@{#35310}
parent 7df3477a
......@@ -1694,7 +1694,8 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
// Overflow checked for add/sub only.
DCHECK((condition != kOverflow && condition != kNotOverflow) ||
(op == kS390_AddWithOverflow32 || op == kS390_SubWithOverflow32));
(op == kS390_AddWithOverflow32 || op == kS390_SubWithOverflow32) ||
(op == kS390_Add || op == kS390_Sub));
// Materialize a full 32-bit 1 or 0 value. The result register is always the
// last output of the instruction.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment