Commit 91cd0707 authored by ahaas's avatar ahaas Committed by Commit bot

[arm64][turbofan] Tst instructions can have a shifted operand.

This CL fixes a bug in the implementation of the code generation of
kArm64Tst32, where the shift input operand of kArm64Tst32 was ignored.
Please take a special look at the fix in kArm64Tst. I applied the fix
there as well, but because of differences in the instruction selector
I was not able to write a test for it.

R=v8-arm-ports@googlegroups.com
BUG=v8:6028

Review-Url: https://codereview.chromium.org/2729853003
Cr-Commit-Position: refs/heads/master@{#43555}
parent af55a297
......@@ -1278,10 +1278,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ Cmn(i.InputOrZeroRegister32(0), i.InputOperand2_32(1));
break;
case kArm64Tst:
__ Tst(i.InputOrZeroRegister64(0), i.InputOperand(1));
__ Tst(i.InputOrZeroRegister64(0), i.InputOperand2_64(1));
break;
case kArm64Tst32:
__ Tst(i.InputOrZeroRegister32(0), i.InputOperand32(1));
__ Tst(i.InputOrZeroRegister32(0), i.InputOperand2_32(1));
break;
case kArm64Float32Cmp:
if (instr->InputAt(1)->IsFPRegister()) {
......
......@@ -6741,6 +6741,15 @@ TEST(Regression5951) {
#endif // V8_TARGET_ARCH_64_BIT
TEST(Regression6028) {
BufferedRawMachineAssemblerTester<int32_t> m;
m.Return(m.Word32Equal(
m.Word32And(m.Int32Constant(0x23),
m.Word32Sar(m.Int32Constant(1), m.Int32Constant(18))),
m.Int32Constant(0)));
CHECK_EQ(1, m.Call());
}
} // namespace compiler
} // namespace internal
} // namespace v8
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