8248668: AArch64: Avoid MIN/MAX macros when using MSVC
MSVC employs min/max as macros Co-authored-by: Ludovic Henry <luhenry@microsoft.com> Reviewed-by: tschatzl, kbarrett
This commit is contained in:
parent
eaeb43542b
commit
26680f0c1a
src/hotspot/cpu/aarch64
@ -10150,7 +10150,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);
|
||||
|
@ -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: {
|
||||
|
@ -4060,7 +4060,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
|
||||
@ -4218,7 +4218,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));
|
||||
@ -4644,7 +4644,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user