Skip to content

Commit 5180c3d

Browse files
committed
Backport aee4b02
1 parent 924bd91 commit 5180c3d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,11 @@ void C2_MacroAssembler::count_positives(Register src, Register cnt, Register res
594594

595595
bind(Lslow); // Fallback to slow version.
596596
subf(tmp0, src, result); // Bytes known positive.
597-
subf_(tmp0, tmp0, cnt); // Remaining Bytes.
597+
clrldi(tmp1, cnt, 32); // Clear garbage from upper 32 bits.
598+
subf_(tmp0, tmp0, tmp1); // Remaining Bytes.
598599
beq(CCR0, Ldone);
599600
mtctr(tmp0);
601+
600602
bind(Lloop);
601603
lbz(tmp0, 0, result);
602604
andi_(tmp0, tmp0, 0x80);

0 commit comments

Comments
 (0)