comparison jvmci/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java @ 23674:09a536b9233c

8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 09 Jun 2016 18:45:12 -0700
parents 9ed5b586018b
children b5557b757040
comparison
equal deleted inserted replaced
23673:7ef84c807bfe 23674:09a536b9233c
79 79
80 private final TargetDescription target; 80 private final TargetDescription target;
81 81
82 private final Register[] allocatable; 82 private final Register[] allocatable;
83 83
84 private final int maxFrameSize;
85
86 /** 84 /**
87 * The caller saved registers always include all parameter registers. 85 * The caller saved registers always include all parameter registers.
88 */ 86 */
89 private final Register[] callerSaved; 87 private final Register[] callerSaved;
90 88
91 private final boolean allAllocatableAreCallerSaved; 89 private final boolean allAllocatableAreCallerSaved;
92 90
93 private final RegisterAttributes[] attributesMap; 91 private final RegisterAttributes[] attributesMap;
94
95 public int getMaximumFrameSize() {
96 return maxFrameSize;
97 }
98 92
99 @Override 93 @Override
100 public Register[] getAllocatableRegisters() { 94 public Register[] getAllocatableRegisters() {
101 return allocatable.clone(); 95 return allocatable.clone();
102 } 96 }
159 assert idx == registers.length; 153 assert idx == registers.length;
160 return registers; 154 return registers;
161 } 155 }
162 156
163 public AArch64HotSpotRegisterConfig(TargetDescription target, HotSpotVMConfig config) { 157 public AArch64HotSpotRegisterConfig(TargetDescription target, HotSpotVMConfig config) {
164 this(target, config, initAllocatable(target.arch, config.useCompressedOops)); 158 this(target, initAllocatable(target.arch, config.useCompressedOops));
165 assert callerSaved.length >= allocatable.length; 159 assert callerSaved.length >= allocatable.length;
166 } 160 }
167 161
168 public AArch64HotSpotRegisterConfig(TargetDescription target, HotSpotVMConfig config, Register[] allocatable) { 162 public AArch64HotSpotRegisterConfig(TargetDescription target, Register[] allocatable) {
169 this.target = target; 163 this.target = target;
170 this.maxFrameSize = config.maxFrameSize;
171 164
172 this.allocatable = allocatable.clone(); 165 this.allocatable = allocatable.clone();
173 Set<Register> callerSaveSet = new HashSet<>(); 166 Set<Register> callerSaveSet = new HashSet<>();
174 Collections.addAll(callerSaveSet, allocatable); 167 Collections.addAll(callerSaveSet, allocatable);
175 Collections.addAll(callerSaveSet, simdParameterRegisters); 168 Collections.addAll(callerSaveSet, simdParameterRegisters);