Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -9660,7 +9660,7 @@ instruct lshift_ext(iRegLNoSp dst, iRegIorL2I src, immI scale, rFlagsReg cr) %{
ins_encode %{
__ sbfiz(as_Register($dst$$reg),
as_Register($src$$reg),
$scale$$constant & 63, MIN(32, (-$scale$$constant) & 63));
$scale$$constant & 63, MIN2(32, (int)((-$scale$$constant) & 63)));
%}

ins_pipe(ialu_reg_shift);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/assembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ void Address::lea(MacroAssembler *as, Register r) const {
break;
}
case base_plus_offset_reg: {
__ add(r, _base, _index, _ext.op(), MAX(_ext.shift(), 0));
__ add(r, _base, _index, _ext.op(), MAX2(_ext.shift(), 0));
break;
}
case literal: {
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4020,7 +4020,7 @@ class StubGenerator: public StubCodeGenerator {
FloatRegister vtmpZ = v0, vtmp = v1, vtmp3 = v2;
RegSet spilled_regs = RegSet::of(tmp3, tmp4);

int prefetchLoopExitCondition = MAX(64, SoftwarePrefetchHintDistance/2);
int prefetchLoopExitCondition = MAX2(64, SoftwarePrefetchHintDistance/2);

__ eor(vtmpZ, __ T16B, vtmpZ, vtmpZ);
// cnt2 == amount of characters left to compare
Expand Down Expand Up @@ -4136,7 +4136,7 @@ class StubGenerator: public StubCodeGenerator {
DIFF_LAST_POSITION, DIFF_LAST_POSITION2;
// exit from large loop when less than 64 bytes left to read or we're about
// to prefetch memory behind array border
int largeLoopExitCondition = MAX(64, SoftwarePrefetchHintDistance)/(isLL ? 1 : 2);
int largeLoopExitCondition = MAX2(64, SoftwarePrefetchHintDistance)/(isLL ? 1 : 2);
// cnt1/cnt2 contains amount of characters to compare. cnt1 can be re-used
// update cnt2 counter with already loaded 8 bytes
__ sub(cnt2, cnt2, wordSize/(isLL ? 1 : 2));
Expand Down Expand Up @@ -4561,7 +4561,7 @@ class StubGenerator: public StubCodeGenerator {
address entry = __ pc();
Label LOOP, LOOP_START, LOOP_PRFM, LOOP_PRFM_START, DONE;
Register src = r0, dst = r1, len = r2, octetCounter = r3;
const int large_loop_threshold = MAX(64, SoftwarePrefetchHintDistance)/8 + 4;
const int large_loop_threshold = MAX2(64, SoftwarePrefetchHintDistance)/8 + 4;

// do one more 8-byte read to have address 16-byte aligned in most cases
// also use single store instruction
Expand Down