Commit 195b9dfd authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC: [regexp] Use cmp to compare large backtrack_limit inputs

cmpi only takes in a 16 bit signed integer. For larger
inputs we must use cmp with a register input.

Change-Id: I318d714930553fbad4c34097c7530055308f331a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2490460Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70689}
parent ff9c41bb
......@@ -177,7 +177,8 @@ void RegExpMacroAssemblerPPC::Backtrack() {
__ LoadP(r3, MemOperand(frame_pointer(), kBacktrackCount), r0);
__ addi(r3, r3, Operand(1));
__ StoreP(r3, MemOperand(frame_pointer(), kBacktrackCount), r0);
__ cmpi(r3, Operand(backtrack_limit()));
__ mov(r0, Operand(backtrack_limit()));
__ cmp(r3, r0);
__ bne(&next);
// Backtrack limit exceeded.
......
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