< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java

Print this page




  96         @Use({REG}) private AllocatableValue constantTableBase;
  97         @Def({REG, STACK}) AllocatableValue result;
  98 
  99         public LoadHotSpotObjectConstantFromTable(HotSpotConstant constant, AllocatableValue result, AllocatableValue constantTableBase) {
 100             super(TYPE, SIZE);
 101             this.constant = constant;
 102             this.result = result;
 103             this.constantTableBase = constantTableBase;
 104         }
 105 
 106         @Override
 107         protected void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
 108             try (ScratchRegister scratch = masm.getScratchRegister()) {
 109                 boolean isStack = ValueUtil.isStackSlot(result);
 110                 Register register;
 111                 if (isStack) {
 112                     register = scratch.getRegister();
 113                 } else {
 114                     register = asRegister(result);
 115                 }
 116                 int bytes = result.getPlatformKind().getSizeInBytes();
 117                 loadFromConstantTable(crb, masm, bytes, asRegister(constantTableBase), constant, register, SPARCDelayedControlTransfer.DUMMY);
 118                 if (isStack) {
 119                     masm.st(register, (SPARCAddress) crb.asAddress(result), bytes);
 120                 }
 121             }
 122         }
 123     }
 124 
 125     public static final class CompressPointer extends SPARCLIRInstruction {
 126         public static final LIRInstructionClass<CompressPointer> TYPE = LIRInstructionClass.create(CompressPointer.class);
 127         public static final SizeEstimate SIZE = SizeEstimate.create(5);
 128 
 129         private final CompressEncoding encoding;
 130         private final boolean nonNull;
 131 
 132         @Def({REG}) protected AllocatableValue result;
 133         @Use({REG}) protected AllocatableValue input;
 134         @Alive({REG, ILLEGAL}) protected AllocatableValue baseRegister;
 135 
 136         public CompressPointer(AllocatableValue result, AllocatableValue input, AllocatableValue baseRegister, CompressEncoding encoding, boolean nonNull) {
 137             super(TYPE, SIZE);




  96         @Use({REG}) private AllocatableValue constantTableBase;
  97         @Def({REG, STACK}) AllocatableValue result;
  98 
  99         public LoadHotSpotObjectConstantFromTable(HotSpotConstant constant, AllocatableValue result, AllocatableValue constantTableBase) {
 100             super(TYPE, SIZE);
 101             this.constant = constant;
 102             this.result = result;
 103             this.constantTableBase = constantTableBase;
 104         }
 105 
 106         @Override
 107         protected void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
 108             try (ScratchRegister scratch = masm.getScratchRegister()) {
 109                 boolean isStack = ValueUtil.isStackSlot(result);
 110                 Register register;
 111                 if (isStack) {
 112                     register = scratch.getRegister();
 113                 } else {
 114                     register = asRegister(result);
 115                 }
 116                 int bytes = loadFromConstantTable(crb, masm, asRegister(constantTableBase), constant, register, SPARCDelayedControlTransfer.DUMMY);

 117                 if (isStack) {
 118                     masm.st(register, (SPARCAddress) crb.asAddress(result), bytes);
 119                 }
 120             }
 121         }
 122     }
 123 
 124     public static final class CompressPointer extends SPARCLIRInstruction {
 125         public static final LIRInstructionClass<CompressPointer> TYPE = LIRInstructionClass.create(CompressPointer.class);
 126         public static final SizeEstimate SIZE = SizeEstimate.create(5);
 127 
 128         private final CompressEncoding encoding;
 129         private final boolean nonNull;
 130 
 131         @Def({REG}) protected AllocatableValue result;
 132         @Use({REG}) protected AllocatableValue input;
 133         @Alive({REG, ILLEGAL}) protected AllocatableValue baseRegister;
 134 
 135         public CompressPointer(AllocatableValue result, AllocatableValue input, AllocatableValue baseRegister, CompressEncoding encoding, boolean nonNull) {
 136             super(TYPE, SIZE);


< prev index next >