Skip to content

Commit e966c3c

Browse files
author
duke
committedJul 9, 2020
Automatic merge of jdk:master into master
2 parents 475eb10 + 97b948a commit e966c3c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

+10-6
Original file line numberDiff line numberDiff line change
@@ -1955,16 +1955,20 @@ void BoxLockNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
19551955
int offset = ra_->reg2offset(in_RegMask(0).find_first_elem());
19561956
int reg = ra_->get_encode(this);
19571957

1958-
if (Assembler::operand_valid_for_add_sub_immediate(offset)) {
1959-
__ add(as_Register(reg), sp, offset);
1960-
} else {
1961-
ShouldNotReachHere();
1962-
}
1958+
// This add will handle any 24-bit signed offset. 24 bits allows an
1959+
// 8 megabyte stack frame.
1960+
__ add(as_Register(reg), sp, offset);
19631961
}
19641962

19651963
uint BoxLockNode::size(PhaseRegAlloc *ra_) const {
19661964
// BoxLockNode is not a MachNode, so we can't just call MachNode::size(ra_).
1967-
return 4;
1965+
int offset = ra_->reg2offset(in_RegMask(0).find_first_elem());
1966+
1967+
if (Assembler::operand_valid_for_add_sub_immediate(offset)) {
1968+
return NativeInstruction::instruction_size;
1969+
} else {
1970+
return 2 * NativeInstruction::instruction_size;
1971+
}
19681972
}
19691973

19701974
//=============================================================================

0 commit comments

Comments
 (0)
Please sign in to comment.