Skip to content

Commit

Permalink
Leave handling of Argument::float_on_stack_offset_in_bytes_c in CallA…
Browse files Browse the repository at this point in the history
…rranger.
  • Loading branch information
TheRealMDoerr committed Oct 17, 2023
1 parent a37fd00 commit 1edee2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/hotspot/cpu/ppc/foreignGlobals_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ static void move_float(MacroAssembler* masm, int out_stk_bias,
case StorageType::STACK:
if (from_reg.segment_mask() == REG32_MASK) {
assert(to_reg.stack_size() == 4, "size should match");
__ stfs(as_FloatRegister(from_reg), reg2offset(to_reg, out_stk_bias) + Argument::float_on_stack_offset_in_bytes_c, R1_SP);
// Note: Argument::float_on_stack_offset_in_bytes_c is handled by CallArranger
__ stfs(as_FloatRegister(from_reg), reg2offset(to_reg, out_stk_bias), R1_SP);
} else {
assert(to_reg.stack_size() == 8, "size should match");
__ stfd(as_FloatRegister(from_reg), reg2offset(to_reg, out_stk_bias), R1_SP);
Expand All @@ -207,7 +208,8 @@ static void move_stack(MacroAssembler* masm, Register callerSP, int in_stk_bias,
case StorageType::FLOAT:
switch (from_reg.stack_size()) {
case 8: __ lfd(as_FloatRegister(to_reg), reg2offset(from_reg, in_stk_bias), callerSP); break;
case 4: __ lfs(as_FloatRegister(to_reg), reg2offset(from_reg, in_stk_bias) + Argument::float_on_stack_offset_in_bytes_c, callerSP); break;
// Note: Argument::float_on_stack_offset_in_bytes_c is handled by CallArranger
case 4: __ lfs(as_FloatRegister(to_reg), reg2offset(from_reg, in_stk_bias), callerSP); break;
default: ShouldNotReachHere();
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ VMStorage nextStorage(int type, boolean is32Bit) {
// Stack layout computation: We need to count all arguments in order to get the correct
// offset for the next argument which will really use the stack.
// The reserved space for the Parameter Save Area is determined by the DowncallStubGenerator.
VMStorage stack = stackAlloc(is32Bit ? 4 : 8, STACK_SLOT_SIZE);
VMStorage stack;
if (!useABIv2 && is32Bit) {
stackAlloc(4, STACK_SLOT_SIZE); // Skip first half of stack slot.
stack = stackAlloc(4, 4);
} else {
stack = stackAlloc(is32Bit ? 4 : 8, STACK_SLOT_SIZE);
}
if (reg == null) return stack;
if (is32Bit) {
reg = new VMStorage(reg.type(), PPC64Architecture.REG32_MASK, reg.indexOrOffset());
Expand Down

0 comments on commit 1edee2e

Please sign in to comment.