Skip to content

Commit

Permalink
[maglev] Compare tagged values when comparing Smis
Browse files Browse the repository at this point in the history
CompareSmiAndJumpIf should look at 32-bit values under pointer
compression, which means it should use CompareTaggedAndBranch on arm64.

Bug: v8:7700
Change-Id: I301bda7cdae11154314a0c2721de279aaebd0fff
Fixed: chromium:1440723
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4553342
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#87791}
  • Loading branch information
LeszekSwirski authored and V8 LUCI CQ committed May 23, 2023
1 parent 6dcdb71 commit bf6aa50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/maglev/arm64/maglev-assembler-arm64-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ inline void MaglevAssembler::CompareSmiAndJumpIf(Register r1, Smi value,
Condition cond, Label* target,
Label::Distance distance) {
AssertSmi(r1);
CompareAndBranch(r1, Immediate(value), cond, target);
CompareTaggedAndBranch(r1, Immediate(value), cond, target);
}

inline void MaglevAssembler::TestInt32AndJumpIfAnySet(
Expand Down

0 comments on commit bf6aa50

Please sign in to comment.