38 39 /** 40 * Loads the constant section base into a register. 41 * 42 * <p> 43 * Layout: 44 * 45 * <pre> 46 * +----constant section----+--pad--+---code section--+ 47 * |<-------------------_------------------->| 48 * ^- Constant section base pointer 49 * </pre> 50 * 51 * The constant section base pointer is placed as such that the lowest offset -4096 points to the 52 * start of the constant section. 53 * <p> 54 * If the constant section grows beyond 8k size, the immediate addressing cannot be used anymore; in 55 * this case absolute addressing (without using the base pointer is used). See also: 56 * CodeInstaller::pd_patch_DataSectionReference 57 * 58 * @see SPARCMove#loadFromConstantTable(CompilationResultBuilder, SPARCMacroAssembler, int, 59 * Register, jdk.vm.ci.meta.Constant, Register, SPARCDelayedControlTransfer) 60 */ 61 public class SPARCLoadConstantTableBaseOp extends SPARCLIRInstruction { 62 public static final LIRInstructionClass<SPARCLoadConstantTableBaseOp> TYPE = LIRInstructionClass.create(SPARCLoadConstantTableBaseOp.class); 63 public static final SizeEstimate SIZE = SizeEstimate.create(9); 64 65 private final NoOp placeHolder; 66 @Def({REG}) private AllocatableValue base; 67 68 public SPARCLoadConstantTableBaseOp(Variable base, NoOp placeHolder) { 69 super(TYPE, SIZE); 70 this.base = base; 71 this.placeHolder = placeHolder; 72 } 73 74 @Override 75 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { 76 Register baseRegister = asRegister(base); 77 int beforePosition = masm.position(); 78 masm.rdpc(baseRegister); 79 // Must match with CodeInstaller::pd_patch_DataSectionReference | 38 39 /** 40 * Loads the constant section base into a register. 41 * 42 * <p> 43 * Layout: 44 * 45 * <pre> 46 * +----constant section----+--pad--+---code section--+ 47 * |<-------------------_------------------->| 48 * ^- Constant section base pointer 49 * </pre> 50 * 51 * The constant section base pointer is placed as such that the lowest offset -4096 points to the 52 * start of the constant section. 53 * <p> 54 * If the constant section grows beyond 8k size, the immediate addressing cannot be used anymore; in 55 * this case absolute addressing (without using the base pointer is used). See also: 56 * CodeInstaller::pd_patch_DataSectionReference 57 * 58 * @see SPARCMove#loadFromConstantTable(CompilationResultBuilder, SPARCMacroAssembler, Register, 59 * jdk.vm.ci.meta.Constant, Register, SPARCDelayedControlTransfer) 60 */ 61 public class SPARCLoadConstantTableBaseOp extends SPARCLIRInstruction { 62 public static final LIRInstructionClass<SPARCLoadConstantTableBaseOp> TYPE = LIRInstructionClass.create(SPARCLoadConstantTableBaseOp.class); 63 public static final SizeEstimate SIZE = SizeEstimate.create(9); 64 65 private final NoOp placeHolder; 66 @Def({REG}) private AllocatableValue base; 67 68 public SPARCLoadConstantTableBaseOp(Variable base, NoOp placeHolder) { 69 super(TYPE, SIZE); 70 this.base = base; 71 this.placeHolder = placeHolder; 72 } 73 74 @Override 75 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { 76 Register baseRegister = asRegister(base); 77 int beforePosition = masm.position(); 78 masm.rdpc(baseRegister); 79 // Must match with CodeInstaller::pd_patch_DataSectionReference |