hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestAssembler.java
changeset 39441 7464b1552bf7
parent 39423 0f8dc3693499
child 40059 c2304140ed64
equal deleted inserted replaced
39436:f07320a4e634 39441:7464b1552bf7
   231     protected Register newRegister() {
   231     protected Register newRegister() {
   232         return registers[nextRegister++];
   232         return registers[nextRegister++];
   233     }
   233     }
   234 
   234 
   235     protected StackSlot newStackSlot(PlatformKind kind) {
   235     protected StackSlot newStackSlot(PlatformKind kind) {
   236         curStackSlot += kind.getSizeInBytes();
   236         growFrame(kind.getSizeInBytes());
       
   237         return StackSlot.get(new TestValueKind(kind), -curStackSlot, true);
       
   238     }
       
   239 
       
   240     protected void growFrame(int sizeInBytes) {
       
   241         curStackSlot += sizeInBytes;
   237         if (curStackSlot > frameSize) {
   242         if (curStackSlot > frameSize) {
   238             int newFrameSize = curStackSlot;
   243             int newFrameSize = curStackSlot;
   239             if (newFrameSize % stackAlignment != 0) {
   244             if (newFrameSize % stackAlignment != 0) {
   240                 newFrameSize += stackAlignment - (newFrameSize % stackAlignment);
   245                 newFrameSize += stackAlignment - (newFrameSize % stackAlignment);
   241             }
   246             }
   242             emitGrowStack(newFrameSize - frameSize);
   247             emitGrowStack(newFrameSize - frameSize);
   243             frameSize = newFrameSize;
   248             frameSize = newFrameSize;
   244         }
   249         }
   245         return StackSlot.get(new TestValueKind(kind), -curStackSlot, true);
       
   246     }
   250     }
   247 
   251 
   248     protected void setDeoptRescueSlot(StackSlot deoptRescue) {
   252     protected void setDeoptRescueSlot(StackSlot deoptRescue) {
   249         this.deoptRescue = deoptRescue;
   253         this.deoptRescue = deoptRescue;
   250     }
   254     }