< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java
Print this page
*** 32,41 ****
--- 32,42 ----
import static org.graalvm.compiler.lir.LIRValueUtil.isVirtualStackSlot;
import java.util.ArrayList;
import java.util.List;
+ import jdk.vm.ci.code.RegisterConfig;
import org.graalvm.compiler.asm.Label;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.calc.Condition;
import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
import org.graalvm.compiler.core.common.spi.CodeGenProviders;
*** 199,210 ****
public Variable newVariable(ValueKind<?> valueKind) {
return new Variable(valueKind, ((VariableProvider) res.getLIR()).nextVariable());
}
@Override
public RegisterAttributes attributes(Register register) {
! return res.getFrameMapBuilder().getRegisterConfig().getAttributesMap()[register.number];
}
@Override
public Variable emitMove(Value input) {
assert !(input instanceof Variable) : "Creating a copy of a variable via this method is not supported (and potentially a bug): " + input;
--- 200,216 ----
public Variable newVariable(ValueKind<?> valueKind) {
return new Variable(valueKind, ((VariableProvider) res.getLIR()).nextVariable());
}
@Override
+ public RegisterConfig getRegisterConfig() {
+ return res.getRegisterConfig();
+ }
+
+ @Override
public RegisterAttributes attributes(Register register) {
! return getRegisterConfig().getAttributesMap()[register.number];
}
@Override
public Variable emitMove(Value input) {
assert !(input instanceof Variable) : "Creating a copy of a variable via this method is not supported (and potentially a bug): " + input;
*** 226,236 ****
@Override
public Value emitConstant(LIRKind kind, Constant constant) {
if (moveFactory.canInlineConstant(constant)) {
return new ConstantValue(toRegisterKind(kind), constant);
} else {
! return emitLoadConstant(kind, constant);
}
}
@Override
public Value emitJavaConstant(JavaConstant constant) {
--- 232,242 ----
@Override
public Value emitConstant(LIRKind kind, Constant constant) {
if (moveFactory.canInlineConstant(constant)) {
return new ConstantValue(toRegisterKind(kind), constant);
} else {
! return emitLoadConstant(toRegisterKind(kind), constant);
}
}
@Override
public Value emitJavaConstant(JavaConstant constant) {
*** 287,297 ****
* @return the operand representing the ABI defined location used return a value of kind
* {@code kind}
*/
@Override
public AllocatableValue resultOperandFor(JavaKind javaKind, ValueKind<?> valueKind) {
! Register reg = res.getFrameMapBuilder().getRegisterConfig().getReturnRegister(javaKind);
assert target().arch.canStoreValue(reg.getRegisterCategory(), valueKind.getPlatformKind()) : reg.getRegisterCategory() + " " + valueKind.getPlatformKind();
return reg.asValue(valueKind);
}
NodeSourcePosition currentPosition;
--- 293,303 ----
* @return the operand representing the ABI defined location used return a value of kind
* {@code kind}
*/
@Override
public AllocatableValue resultOperandFor(JavaKind javaKind, ValueKind<?> valueKind) {
! Register reg = getRegisterConfig().getReturnRegister(javaKind);
assert target().arch.canStoreValue(reg.getRegisterCategory(), valueKind.getPlatformKind()) : reg.getRegisterCategory() + " " + valueKind.getPlatformKind();
return reg.asValue(valueKind);
}
NodeSourcePosition currentPosition;
< prev index next >