8203344: Make C1 leal patchable on SPARC

Reviewed-by: neliasso, thartmann
This commit is contained in:
Erik Österlund 2018-06-13 15:08:08 +02:00
parent 78b7362c97
commit d6cc86f800

View File

@ -3202,6 +3202,20 @@ void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest, LIR_PatchCode patch_cod
const Register dest_reg = dest->as_pointer_register(); const Register dest_reg = dest->as_pointer_register();
const Register base_reg = addr->base()->as_pointer_register(); const Register base_reg = addr->base()->as_pointer_register();
if (patch_code != lir_patch_none) {
PatchingStub* patch = new PatchingStub(_masm, PatchingStub::access_field_id);
assert(addr->disp() != 0, "must have");
assert(base_reg != G3_scratch, "invariant");
__ patchable_set(0, G3_scratch);
patching_epilog(patch, patch_code, base_reg, info);
assert(dest_reg != G3_scratch, "invariant");
if (addr->index()->is_valid()) {
const Register index_reg = addr->index()->as_pointer_register();
assert(index_reg != G3_scratch, "invariant");
__ add(index_reg, G3_scratch, G3_scratch);
}
__ add(base_reg, G3_scratch, dest_reg);
} else {
if (Assembler::is_simm13(addr->disp())) { if (Assembler::is_simm13(addr->disp())) {
if (addr->index()->is_valid()) { if (addr->index()->is_valid()) {
const Register index_reg = addr->index()->as_pointer_register(); const Register index_reg = addr->index()->as_pointer_register();
@ -3221,6 +3235,7 @@ void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest, LIR_PatchCode patch_cod
__ add(base_reg, G3_scratch, dest_reg); __ add(base_reg, G3_scratch, dest_reg);
} }
} }
}
void LIR_Assembler::get_thread(LIR_Opr result_reg) { void LIR_Assembler::get_thread(LIR_Opr result_reg) {