8308765: RISC-V: Expand size of stub routines for zgc only
Reviewed-by: fjiang, fyang
This commit is contained in:
parent
4aea7dab15
commit
d66b6d8fd2
src/hotspot/cpu/riscv
@ -758,8 +758,8 @@ void MacroAssembler::la(Register Rd, Label &label) {
|
||||
wrap_label(Rd, label, &MacroAssembler::la);
|
||||
}
|
||||
|
||||
void MacroAssembler::li16u(Register Rd, int32_t imm) {
|
||||
lui(Rd, imm << 12);
|
||||
void MacroAssembler::li16u(Register Rd, uint16_t imm) {
|
||||
lui(Rd, (uint32_t)imm << 12);
|
||||
srli(Rd, Rd, 12);
|
||||
}
|
||||
|
||||
@ -1412,8 +1412,8 @@ static int patch_imm_in_li64(address branch, address target) {
|
||||
return LI64_INSTRUCTIONS_NUM * NativeInstruction::instruction_size;
|
||||
}
|
||||
|
||||
static int patch_imm_in_li16u(address branch, int32_t target) {
|
||||
Assembler::patch(branch, 31, 12, target & 0xfffff); // patch lui only
|
||||
static int patch_imm_in_li16u(address branch, uint16_t target) {
|
||||
Assembler::patch(branch, 31, 12, target); // patch lui only
|
||||
return NativeInstruction::instruction_size;
|
||||
}
|
||||
|
||||
@ -1508,7 +1508,7 @@ int MacroAssembler::pd_patch_instruction_size(address branch, address target) {
|
||||
return patch_imm_in_li32(branch, (int32_t)imm);
|
||||
} else if (NativeInstruction::is_li16u_at(branch)) {
|
||||
int64_t imm = (intptr_t)target;
|
||||
return patch_imm_in_li16u(branch, (int32_t)imm);
|
||||
return patch_imm_in_li16u(branch, (uint16_t)imm);
|
||||
} else {
|
||||
#ifdef ASSERT
|
||||
tty->print_cr("pd_patch_instruction_size: instruction 0x%x at " INTPTR_FORMAT " could not be patched!\n",
|
||||
|
@ -693,7 +693,7 @@ public:
|
||||
void la(Register Rd, const address dest);
|
||||
void la(Register Rd, const Address &adr);
|
||||
|
||||
void li16u(Register Rd, int32_t imm);
|
||||
void li16u(Register Rd, uint16_t imm);
|
||||
void li32(Register Rd, int32_t imm);
|
||||
void li64(Register Rd, int64_t imm);
|
||||
void li (Register Rd, int64_t imm); // optimized load immediate
|
||||
|
@ -37,10 +37,10 @@ static bool returns_to_call_stub(address return_pc) {
|
||||
|
||||
enum platform_dependent_constants {
|
||||
// simply increase sizes if too small (assembler will crash if too small)
|
||||
_initial_stubs_code_size = 19000,
|
||||
_initial_stubs_code_size = 10000,
|
||||
_continuation_stubs_code_size = 2000,
|
||||
_compiler_stubs_code_size = 128000,
|
||||
_final_stubs_code_size = 128000
|
||||
_compiler_stubs_code_size = 15000 ZGC_ONLY(+5000),
|
||||
_final_stubs_code_size = 20000 ZGC_ONLY(+10000)
|
||||
};
|
||||
|
||||
class riscv {
|
||||
|
Loading…
x
Reference in New Issue
Block a user