Mercurial > hg > graal-compiler
changeset 22642:3345942ec7f3
Update jvmci import: Clean separation between backend and frontend wordKind.
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Wed Sep 16 12:19:31 2015 +0200 @@ -259,7 +259,7 @@ @Override public Variable emitAddress(StackSlotValue address) { - Variable result = newVariable(LIRKind.value(target().wordKind)); + Variable result = newVariable(LIRKind.value(target().arch.getWordKind())); append(new StackLeaOp(result, address)); return result; } @@ -1473,7 +1473,7 @@ @Override protected void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, Value key) { - append(new TableSwitchOp(lowKey, defaultTarget, targets, key, newVariable(LIRKind.value(target().wordKind)), newVariable(key.getLIRKind()))); + append(new TableSwitchOp(lowKey, defaultTarget, targets, key, newVariable(LIRKind.value(target().arch.getWordKind())), newVariable(key.getLIRKind()))); } }
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Wed Sep 16 12:19:31 2015 +0200 @@ -198,7 +198,7 @@ @Override public Variable emitAddress(StackSlotValue address) { - Variable result = newVariable(LIRKind.value(target().wordKind)); + Variable result = newVariable(LIRKind.value(target().arch.getWordKind())); append(new StackLoadAddressOp(result, address)); return result; } @@ -447,7 +447,7 @@ // value Variable tmp = newVariable(key.getLIRKind()); emitMove(tmp, key); - append(new TableSwitchOp(lowKey, defaultTarget, targets, tmp, newVariable(LIRKind.value(target().wordKind)))); + append(new TableSwitchOp(lowKey, defaultTarget, targets, tmp, newVariable(LIRKind.value(target().arch.getWordKind())))); } @Override
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java Wed Sep 16 12:19:31 2015 +0200 @@ -97,7 +97,7 @@ replacements = createReplacements(config, p, snippetReflection); } try (InitTimer rt = timer("create WordTypes")) { - wordTypes = new HotSpotWordTypes(metaAccess, target.wordKind); + wordTypes = new HotSpotWordTypes(metaAccess, target.wordJavaKind); } try (InitTimer rt = timer("create GraphBuilderPhase plugins")) { plugins = createGraphBuilderPlugins(config, target, constantReflection, foreignCalls, metaAccess, snippetReflection, replacements, wordTypes, stampProvider);
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotCardTableAddressOp.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotCardTableAddressOp.java Wed Sep 16 12:19:31 2015 +0200 @@ -26,7 +26,7 @@ import jdk.internal.jvmci.hotspot.HotSpotVMConfig; import jdk.internal.jvmci.meta.AllocatableValue; import jdk.internal.jvmci.meta.JavaConstant; -import jdk.internal.jvmci.meta.JavaKind; +import jdk.internal.jvmci.meta.PlatformKind; import com.oracle.graal.asm.amd64.AMD64Address; import com.oracle.graal.asm.amd64.AMD64MacroAssembler; @@ -41,19 +41,17 @@ private final HotSpotVMConfig config; - private final JavaKind wordKind; - - public AMD64HotSpotCardTableAddressOp(AllocatableValue result, HotSpotVMConfig config, JavaKind wordKind) { + public AMD64HotSpotCardTableAddressOp(AllocatableValue result, HotSpotVMConfig config) { super(TYPE); this.result = result; this.config = config; - this.wordKind = wordKind; } @Override public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler asm) { - int alignment = wordKind.getBitCount() / Byte.SIZE; - JavaConstant address = JavaConstant.forIntegerKind(wordKind, 0); + PlatformKind wordKind = crb.target.arch.getWordKind(); + int alignment = wordKind.getSizeInBytes(); + JavaConstant address = JavaConstant.forPrimitiveInt(wordKind.getSizeInBytes() * 8, 0); // recordDataReferenceInCode forces the mov to be rip-relative asm.movq(ValueUtil.asRegister(result), (AMD64Address) crb.recordDataReferenceInCode(address, alignment)); crb.recordMark(config.MARKID_CARD_TABLE_ADDRESS);
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotCardTableShiftOp.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotCardTableShiftOp.java Wed Sep 16 12:19:31 2015 +0200 @@ -27,6 +27,7 @@ import jdk.internal.jvmci.meta.AllocatableValue; import jdk.internal.jvmci.meta.JavaConstant; import jdk.internal.jvmci.meta.JavaKind; +import jdk.internal.jvmci.meta.PlatformKind; import com.oracle.graal.asm.amd64.AMD64Address; import com.oracle.graal.asm.amd64.AMD64MacroAssembler; @@ -41,19 +42,17 @@ private final HotSpotVMConfig config; - private final JavaKind wordKind; - - public AMD64HotSpotCardTableShiftOp(AllocatableValue result, HotSpotVMConfig config, JavaKind wordKind) { + public AMD64HotSpotCardTableShiftOp(AllocatableValue result, HotSpotVMConfig config) { super(TYPE); this.result = result; this.config = config; - this.wordKind = wordKind; } @Override public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler asm) { + PlatformKind wordKind = crb.target.arch.getWordKind(); int alignment = JavaKind.Int.getBitCount() / Byte.SIZE; - JavaConstant shift = JavaConstant.forIntegerKind(wordKind, 0); + JavaConstant shift = JavaConstant.forPrimitiveInt(wordKind.getSizeInBytes() * 8, 0); // recordDataReferenceInCode forces the mov to be rip-relative asm.movq(ValueUtil.asRegister(result), (AMD64Address) crb.recordDataReferenceInCode(shift, alignment)); crb.recordMark(config.MARKID_CARD_TABLE_SHIFT);
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java Wed Sep 16 12:19:31 2015 +0200 @@ -44,9 +44,9 @@ import jdk.internal.jvmci.hotspot.CompilerToVM; import jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntimeProvider; import jdk.internal.jvmci.hotspot.HotSpotVMConfig; -import jdk.internal.jvmci.meta.JavaKind; import jdk.internal.jvmci.meta.LIRKind; import jdk.internal.jvmci.meta.MetaAccessProvider; +import jdk.internal.jvmci.meta.PlatformKind; import jdk.internal.jvmci.meta.Value; import com.oracle.graal.hotspot.HotSpotForeignCallLinkageImpl; @@ -68,7 +68,7 @@ public void initialize(HotSpotProviders providers) { HotSpotVMConfig config = jvmciRuntime.getConfig(); TargetDescription target = providers.getCodeCache().getTarget(); - JavaKind word = target.wordKind; + PlatformKind word = target.arch.getWordKind(); // The calling convention for the exception handler stub is (only?) defined in // TemplateInterpreterGenerator::generate_throw_exception()
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 16 12:19:31 2015 +0200 @@ -114,7 +114,7 @@ private HotSpotLockStack lockStack; protected AMD64HotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes) { - this(new DefaultHotSpotLIRKindTool(providers.getCodeCache().getTarget().wordKind), providers, config, cc, lirGenRes); + this(new DefaultHotSpotLIRKindTool(providers.getCodeCache().getTarget().arch.getWordKind()), providers, config, cc, lirGenRes); } protected AMD64HotSpotLIRGenerator(LIRKindTool lirKindTool, HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes) { @@ -313,14 +313,14 @@ @Override public Value emitCardTableShift() { Variable result = newVariable(LIRKind.value(JavaKind.Long)); - append(new AMD64HotSpotCardTableShiftOp(result, config, target().wordKind)); + append(new AMD64HotSpotCardTableShiftOp(result, config)); return result; } @Override public Value emitCardTableAddress() { Variable result = newVariable(LIRKind.value(JavaKind.Long)); - append(new AMD64HotSpotCardTableAddressOp(result, config, target().wordKind)); + append(new AMD64HotSpotCardTableAddressOp(result, config)); return result; } @@ -505,7 +505,7 @@ } private void moveValueToThread(Value v, int offset) { - LIRKind wordKind = LIRKind.value(target().wordKind); + LIRKind wordKind = LIRKind.value(target().arch.getWordKind()); RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind); AMD64AddressValue address = new AMD64AddressValue(wordKind, thread, offset); emitStore(v.getLIRKind(), address, v, null); @@ -622,7 +622,7 @@ } else if (src instanceof HotSpotObjectConstant) { return new AMD64HotSpotMove.HotSpotLoadObjectConstantOp(dst, (HotSpotObjectConstant) src); } else if (src instanceof HotSpotMetaspaceConstant) { - return new AMD64HotSpotMove.HotSpotLoadMetaspaceConstantOp(dst, (HotSpotMetaspaceConstant) src, target().wordKind); + return new AMD64HotSpotMove.HotSpotLoadMetaspaceConstantOp(dst, (HotSpotMetaspaceConstant) src); } else { return super.createMoveConstant(dst, src); } @@ -634,7 +634,7 @@ CompressEncoding encoding = config.getOopEncoding(); Value uncompressed; if (encoding.shift <= 3) { - LIRKind wordKind = LIRKind.unknownReference(target().wordKind); + LIRKind wordKind = LIRKind.unknownReference(target().arch.getWordKind()); uncompressed = new AMD64AddressValue(wordKind, getProviders().getRegisters().getHeapBaseRegister().asValue(wordKind), asAllocatable(address), Scale.fromInt(1 << encoding.shift), 0); } else { uncompressed = emitUncompress(address, encoding, false);
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotMove.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotMove.java Wed Sep 16 12:19:31 2015 +0200 @@ -115,13 +115,11 @@ @Def({REG, STACK}) private AllocatableValue result; private final HotSpotMetaspaceConstant input; - private final JavaKind wordKind; - public HotSpotLoadMetaspaceConstantOp(AllocatableValue result, HotSpotMetaspaceConstant input, JavaKind wordKind) { + public HotSpotLoadMetaspaceConstantOp(AllocatableValue result, HotSpotMetaspaceConstant input) { super(TYPE); this.result = result; this.input = input; - this.wordKind = wordKind; } @Override @@ -133,7 +131,7 @@ if (isRegister(result)) { if (compressed) { if (isImmutable && generatePIC) { - int alignment = wordKind.getBitCount() / Byte.SIZE; + int alignment = crb.target.wordSize; // recordDataReferenceInCode forces the mov to be rip-relative masm.movl(asRegister(result), (AMD64Address) crb.recordDataReferenceInCode(JavaConstant.INT_0, alignment)); } else { @@ -142,9 +140,9 @@ } } else { if (isImmutable && generatePIC) { - int alignment = wordKind.getBitCount() / Byte.SIZE; + int alignment = crb.target.wordSize; // recordDataReferenceInCode forces the mov to be rip-relative - masm.movq(asRegister(result), (AMD64Address) crb.recordDataReferenceInCode(JavaConstant.INT_0, alignment)); + masm.movq(asRegister(result), (AMD64Address) crb.recordDataReferenceInCode(JavaConstant.LONG_0, alignment)); } else { masm.movq(asRegister(result), input.rawValue()); }
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotSafepointOp.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotSafepointOp.java Wed Sep 16 12:19:31 2015 +0200 @@ -52,7 +52,7 @@ this.state = state; this.config = config; if (isPollingPageFar(config) || ImmutableCode.getValue()) { - temp = tool.getLIRGeneratorTool().newVariable(LIRKind.value(tool.getLIRGeneratorTool().target().wordKind)); + temp = tool.getLIRGeneratorTool().newVariable(LIRKind.value(tool.getLIRGeneratorTool().target().arch.getWordKind())); } else { // Don't waste a register if it's unneeded temp = Value.ILLEGAL;
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Wed Sep 16 12:19:31 2015 +0200 @@ -69,7 +69,7 @@ Providers p = new Providers(metaAccess, codeCache, constantReflection, foreignCalls, lowerer, null, stampProvider); HotSpotSnippetReflectionProvider snippetReflection = new HotSpotSnippetReflectionProvider(runtime); HotSpotReplacementsImpl replacements = new HotSpotReplacementsImpl(p, snippetReflection, config, target); - HotSpotWordTypes wordTypes = new HotSpotWordTypes(metaAccess, target.wordKind); + HotSpotWordTypes wordTypes = new HotSpotWordTypes(metaAccess, target.wordJavaKind); Plugins plugins = createGraphBuilderPlugins(config, metaAccess, constantReflection, foreignCalls, stampProvider, snippetReflection, replacements, wordTypes); replacements.setGraphBuilderPlugins(plugins); HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins, codeCache);
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java Wed Sep 16 12:19:31 2015 +0200 @@ -46,6 +46,7 @@ import jdk.internal.jvmci.meta.JavaKind; import jdk.internal.jvmci.meta.LIRKind; import jdk.internal.jvmci.meta.MetaAccessProvider; +import jdk.internal.jvmci.meta.PlatformKind; import jdk.internal.jvmci.meta.Value; import com.oracle.graal.hotspot.HotSpotForeignCallLinkageImpl; @@ -66,13 +67,13 @@ @Override public void initialize(HotSpotProviders providers) { TargetDescription target = providers.getCodeCache().getTarget(); - JavaKind word = target.wordKind; + PlatformKind word = target.arch.getWordKind(); // The calling convention for the exception handler stub is (only?) defined in // TemplateInterpreterGenerator::generate_throw_exception() // in templateInterpreter_sparc.cpp around line 1925 RegisterValue outgoingException = o0.asValue(target.getLIRKind(JavaKind.Object)); - RegisterValue outgoingExceptionPc = o1.asValue(target.getLIRKind(word)); + RegisterValue outgoingExceptionPc = o1.asValue(LIRKind.value(word)); RegisterValue incomingException = i0.asValue(target.getLIRKind(JavaKind.Object)); RegisterValue incomingExceptionPc = i1.asValue(LIRKind.value(word)); CallingConvention outgoingExceptionCc = new CallingConvention(0, ILLEGAL, outgoingException, outgoingExceptionPc);
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Wed Sep 16 12:19:31 2015 +0200 @@ -131,7 +131,7 @@ private LIRFrameState currentRuntimeCallInfo; public SPARCHotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes) { - this(new DefaultHotSpotLIRKindTool(providers.getCodeCache().getTarget().wordKind), providers, config, cc, lirGenRes); + this(new DefaultHotSpotLIRKindTool(providers.getCodeCache().getTarget().arch.getWordKind()), providers, config, cc, lirGenRes); } protected SPARCHotSpotLIRGenerator(LIRKindTool lirKindTool, HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes) { @@ -212,7 +212,7 @@ Register thread = registers.getThreadRegister(); Value threadTemp = newVariable(LIRKind.value(JavaKind.Long)); Register stackPointer = registers.getStackPointerRegister(); - Variable spScratch = newVariable(LIRKind.value(target().wordKind)); + Variable spScratch = newVariable(LIRKind.value(target().arch.getWordKind())); append(new SPARCHotSpotCRuntimeCallPrologueOp(config.threadLastJavaSpOffset(), thread, stackPointer, threadTemp, spScratch)); result = super.emitForeignCall(hotspotLinkage, debugInfo, args); append(new SPARCHotSpotCRuntimeCallEpilogueOp(config.threadLastJavaSpOffset(), config.threadLastJavaPcOffset(), config.threadJavaFrameAnchorFlagsOffset(), thread, threadTemp)); @@ -254,7 +254,7 @@ } private void moveValueToThread(Value v, int offset) { - LIRKind wordKind = LIRKind.value(target().wordKind); + LIRKind wordKind = LIRKind.value(target().arch.getWordKind()); RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind); SPARCAddressValue pendingDeoptAddress = new SPARCImmediateAddressValue(wordKind, thread, offset); append(new StoreOp(v.getPlatformKind(), pendingDeoptAddress, load(v), null)); @@ -263,7 +263,7 @@ @Override public void emitDeoptimize(Value actionAndReason, Value speculation, LIRFrameState state) { moveDeoptValuesToThread(actionAndReason, speculation); - append(new SPARCDeoptimizeOp(state, target().wordKind)); + append(new SPARCDeoptimizeOp(state, target().arch.getWordKind())); } @Override @@ -469,9 +469,9 @@ Register thread = getProviders().getRegisters().getThreadRegister(); Variable framePcVariable = load(framePc); Variable senderSpVariable = load(senderSp); - Variable scratchVariable = newVariable(LIRKind.value(target().wordKind)); + Variable scratchVariable = newVariable(LIRKind.value(target().arch.getWordKind())); append(new SPARCHotSpotEnterUnpackFramesStackFrameOp(thread, config.threadLastJavaSpOffset(), config.threadLastJavaPcOffset(), framePcVariable, senderSpVariable, scratchVariable, - target().wordKind)); + target().arch.getWordKind())); } public void emitLeaveUnpackFramesStackFrame(SaveRegistersOp saveRegisterOp) { @@ -491,11 +491,11 @@ ForeignCallLinkage linkage = getForeignCalls().lookupForeignCall(UNCOMMON_TRAP); Register threadRegister = getProviders().getRegisters().getThreadRegister(); - Value threadTemp = newVariable(LIRKind.value(target().wordKind)); + Value threadTemp = newVariable(LIRKind.value(target().arch.getWordKind())); Register stackPointerRegister = getProviders().getRegisters().getStackPointerRegister(); - Variable spScratch = newVariable(LIRKind.value(target().wordKind)); + Variable spScratch = newVariable(LIRKind.value(target().arch.getWordKind())); append(new SPARCHotSpotCRuntimeCallPrologueOp(config.threadLastJavaSpOffset(), threadRegister, stackPointerRegister, threadTemp, spScratch)); - Variable result = super.emitForeignCall(linkage, null, threadRegister.asValue(LIRKind.value(target().wordKind)), trapRequest); + Variable result = super.emitForeignCall(linkage, null, threadRegister.asValue(LIRKind.value(target().arch.getWordKind())), trapRequest); append(new SPARCHotSpotCRuntimeCallEpilogueOp(config.threadLastJavaSpOffset(), config.threadLastJavaPcOffset(), config.threadJavaFrameAnchorFlagsOffset(), threadRegister, threadTemp)); Map<LIRFrameState, SaveRegistersOp> calleeSaveInfo = ((SPARCHotSpotLIRGenerationResult) getResult()).getCalleeSaveInfo(); @@ -511,11 +511,11 @@ ForeignCallLinkage linkage = getForeignCalls().lookupForeignCall(FETCH_UNROLL_INFO); Register threadRegister = getProviders().getRegisters().getThreadRegister(); - Value threadTemp = newVariable(LIRKind.value(target().wordKind)); + Value threadTemp = newVariable(LIRKind.value(target().arch.getWordKind())); Register stackPointerRegister = getProviders().getRegisters().getStackPointerRegister(); - Variable spScratch = newVariable(LIRKind.value(target().wordKind)); + Variable spScratch = newVariable(LIRKind.value(target().arch.getWordKind())); append(new SPARCHotSpotCRuntimeCallPrologueOp(config.threadLastJavaSpOffset(), threadRegister, stackPointerRegister, threadTemp, spScratch)); - Variable result = super.emitForeignCall(linkage, null, threadRegister.asValue(LIRKind.value(target().wordKind))); + Variable result = super.emitForeignCall(linkage, null, threadRegister.asValue(LIRKind.value(target().arch.getWordKind()))); append(new SPARCHotSpotCRuntimeCallEpilogueOp(config.threadLastJavaSpOffset(), config.threadLastJavaPcOffset(), config.threadJavaFrameAnchorFlagsOffset(), threadRegister, threadTemp)); Map<LIRFrameState, SaveRegistersOp> calleeSaveInfo = ((SPARCHotSpotLIRGenerationResult) getResult()).getCalleeSaveInfo(); @@ -558,7 +558,7 @@ public AllocatableValue getSafepointAddressValue() { if (this.safepointAddressValue == null) { - this.safepointAddressValue = newVariable(LIRKind.value(target().wordKind)); + this.safepointAddressValue = newVariable(LIRKind.value(target().arch.getWordKind())); } return this.safepointAddressValue; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotForeignCallLinkageImpl.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotForeignCallLinkageImpl.java Wed Sep 16 12:19:31 2015 +0200 @@ -137,7 +137,7 @@ private static JavaType asJavaType(Class<?> type, MetaAccessProvider metaAccess, CodeCacheProvider codeCache) { if (WordBase.class.isAssignableFrom(type)) { - return metaAccess.lookupJavaType(codeCache.getTarget().wordKind.toJavaClass()); + return metaAccess.lookupJavaType(codeCache.getTarget().wordJavaKind.toJavaClass()); } else { return metaAccess.lookupJavaType(type); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Wed Sep 16 12:19:31 2015 +0200 @@ -365,7 +365,7 @@ HotSpotResolvedJavaMethod hsMethod = (HotSpotResolvedJavaMethod) callTarget.targetMethod(); ResolvedJavaType receiverType = invoke.getReceiverType(); if (hsMethod.isInVirtualMethodTable(receiverType)) { - JavaKind wordKind = runtime.getTarget().wordKind; + JavaKind wordKind = runtime.getTarget().wordJavaKind; ValueNode hub = createReadHub(graph, receiver, receiverNullCheck, tool); ReadNode metaspaceMethod = createReadVirtualMethod(graph, hub, hsMethod, receiverType); @@ -478,7 +478,7 @@ StructuredGraph graph = osrStart.graph(); if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { StartNode newStart = graph.add(new StartNode()); - ParameterNode buffer = graph.unique(new ParameterNode(0, StampFactory.forKind(runtime.getTarget().wordKind))); + ParameterNode buffer = graph.unique(new ParameterNode(0, StampFactory.forKind(runtime.getTarget().wordJavaKind))); ForeignCallNode migrationEnd = graph.add(new ForeignCallNode(foreignCalls, OSR_MIGRATION_END, buffer)); migrationEnd.setStateAfter(osrStart.stateAfter());
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CStringNode.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CStringNode.java Wed Sep 16 12:19:31 2015 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,7 +50,7 @@ } public static AllocatableValue emitCString(NodeLIRBuilderTool gen, String value) { - AllocatableValue dst = gen.getLIRGeneratorTool().newVariable(LIRKind.value(gen.getLIRGeneratorTool().target().wordKind)); + AllocatableValue dst = gen.getLIRGeneratorTool().newVariable(LIRKind.value(gen.getLIRGeneratorTool().target().arch.getWordKind())); gen.getLIRGeneratorTool().emitData(dst, toCString(value)); return dst; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/GetObjectAddressNode.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/GetObjectAddressNode.java Wed Sep 16 12:19:31 2015 +0200 @@ -53,7 +53,7 @@ @Override public void generate(NodeLIRBuilderTool gen) { - AllocatableValue obj = gen.getLIRGeneratorTool().newVariable(LIRKind.unknownReference(gen.getLIRGeneratorTool().target().wordKind)); + AllocatableValue obj = gen.getLIRGeneratorTool().newVariable(LIRKind.unknownReference(gen.getLIRGeneratorTool().target().arch.getWordKind())); gen.getLIRGeneratorTool().emitMove(obj, gen.operand(object)); gen.setResult(this, obj); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Wed Sep 16 12:19:31 2015 +0200 @@ -342,7 +342,7 @@ @Fold public static JavaKind getWordKind() { - return runtime().getHostJVMCIBackend().getCodeCache().getTarget().wordKind; + return runtime().getHostJVMCIBackend().getCodeCache().getTarget().wordJavaKind; } @Fold
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/ArrayCopyCallNode.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/ArrayCopyCallNode.java Wed Sep 16 12:19:31 2015 +0200 @@ -141,7 +141,7 @@ private ValueNode computeBase(ValueNode base, ValueNode pos) { FixedWithNextNode basePtr = graph().add(new GetObjectAddressNode(base)); graph().addBeforeFixed(this, basePtr); - Stamp wordStamp = StampFactory.forKind(runtime.getTarget().wordKind); + Stamp wordStamp = StampFactory.forKind(runtime.getTarget().wordJavaKind); ValueNode wordPos = IntegerConvertNode.convert(pos, wordStamp, graph()); int shift = CodeUtil.log2(getArrayIndexScale(elementKind)); ValueNode scaledIndex = graph().unique(new LeftShiftNode(wordPos, ConstantNode.forInt(shift, graph())));
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java Wed Sep 16 12:19:31 2015 +0200 @@ -124,8 +124,8 @@ ValueNode srcAddr = computeBase(getSource(), getSourcePosition()); ValueNode destAddr = computeBase(getDestination(), getDestinationPosition()); ValueNode len = getLength(); - if (len.stamp().getStackKind() != runtime.getTarget().wordKind) { - len = IntegerConvertNode.convert(len, StampFactory.forKind(runtime.getTarget().wordKind), graph()); + if (len.stamp().getStackKind() != runtime.getTarget().wordJavaKind) { + len = IntegerConvertNode.convert(len, StampFactory.forKind(runtime.getTarget().wordJavaKind), graph()); } ForeignCallNode call = graph.add(new ForeignCallNode(runtime.getHostBackend().getForeignCalls(), desc, srcAddr, destAddr, len, superCheckOffset, destElemKlass)); call.setStateAfter(stateAfter());
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ArrayEqualsOp.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ArrayEqualsOp.java Wed Sep 16 12:19:31 2015 +0200 @@ -85,10 +85,10 @@ this.lengthValue = length; // Allocate some temporaries. - this.temp1 = tool.newVariable(LIRKind.unknownReference(tool.target().wordKind)); - this.temp2 = tool.newVariable(LIRKind.unknownReference(tool.target().wordKind)); - this.temp3 = tool.newVariable(LIRKind.value(tool.target().wordKind)); - this.temp4 = tool.newVariable(LIRKind.value(tool.target().wordKind)); + this.temp1 = tool.newVariable(LIRKind.unknownReference(tool.target().arch.getWordKind())); + this.temp2 = tool.newVariable(LIRKind.unknownReference(tool.target().arch.getWordKind())); + this.temp3 = tool.newVariable(LIRKind.value(tool.target().arch.getWordKind())); + this.temp4 = tool.newVariable(LIRKind.value(tool.target().arch.getWordKind())); // We only need the vector temporaries if we generate SSE code. if (supportsSSE41(tool.target())) {
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArrayEqualsOp.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArrayEqualsOp.java Wed Sep 16 12:19:31 2015 +0200 @@ -90,11 +90,11 @@ this.lengthValue = length; // Allocate some temporaries. - this.temp1 = tool.newVariable(LIRKind.unknownReference(tool.target().wordKind)); - this.temp2 = tool.newVariable(LIRKind.unknownReference(tool.target().wordKind)); - this.temp3 = tool.newVariable(LIRKind.value(tool.target().wordKind)); - this.temp4 = tool.newVariable(LIRKind.value(tool.target().wordKind)); - this.temp5 = tool.newVariable(LIRKind.value(tool.target().wordKind)); + this.temp1 = tool.newVariable(LIRKind.unknownReference(tool.target().arch.getWordKind())); + this.temp2 = tool.newVariable(LIRKind.unknownReference(tool.target().arch.getWordKind())); + this.temp3 = tool.newVariable(LIRKind.value(tool.target().arch.getWordKind())); + this.temp4 = tool.newVariable(LIRKind.value(tool.target().arch.getWordKind())); + this.temp5 = tool.newVariable(LIRKind.value(tool.target().arch.getWordKind())); } @Override
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCControlFlow.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCControlFlow.java Wed Sep 16 12:19:31 2015 +0200 @@ -489,7 +489,7 @@ break; } case Object: { - conditionCode = crb.codeCache.getTarget().wordKind == JavaKind.Long ? CC.Xcc : CC.Icc; + conditionCode = crb.codeCache.getTarget().arch.getWordKind() == JavaKind.Long ? CC.Xcc : CC.Icc; bits = constant.isDefaultForKind() ? 0L : null; break; }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java Wed Sep 16 12:19:31 2015 +0200 @@ -298,7 +298,7 @@ if (objectSlot != null) { result = objectSlot; } else { - result = allocateNewSpillSlot(LIRKind.value(getTarget().wordKind), 0); + result = allocateNewSpillSlot(LIRKind.value(getTarget().arch.getWordKind()), 0); } } } @@ -306,7 +306,7 @@ return result; } else { - return allocateNewSpillSlot(LIRKind.value(getTarget().wordKind), 0); + return allocateNewSpillSlot(LIRKind.value(getTarget().arch.getWordKind()), 0); } }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Sep 16 12:19:31 2015 +0200 @@ -402,11 +402,11 @@ protected LIRKind getAddressKind(Value base, long displacement, Value index) { if (base.getLIRKind().isValue() && (index.equals(Value.ILLEGAL) || index.getLIRKind().isValue())) { - return LIRKind.value(target().wordKind); + return LIRKind.value(target().arch.getWordKind()); } else if (base.getLIRKind().isReference(0) && displacement == 0L && index.equals(Value.ILLEGAL)) { - return LIRKind.reference(target().wordKind); + return LIRKind.reference(target().arch.getWordKind()); } else { - return LIRKind.unknownReference(target().wordKind); + return LIRKind.unknownReference(target().arch.getWordKind()); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java Wed Sep 16 12:19:31 2015 +0200 @@ -78,7 +78,7 @@ if (graph().method() != null) { JavaKind actual = result == null ? JavaKind.Void : result.getStackKind(); JavaKind expected = graph().method().getSignature().getReturnKind().getStackKind(); - if (actual == target.wordKind && expected == JavaKind.Object) { + if (actual == target.wordJavaKind && expected == JavaKind.Object) { // OK, we're compiling a snippet that returns a Word return true; }
--- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Wed Sep 16 12:19:31 2015 +0200 @@ -111,7 +111,7 @@ OffsetAddressNode address = (OffsetAddressNode) read.getAddress(); Assert.assertEquals(cast, address.getBase()); Assert.assertEquals(graph.getParameter(0), cast.getInput()); - Assert.assertEquals(target.wordKind, cast.stamp().getStackKind()); + Assert.assertEquals(target.wordJavaKind, cast.stamp().getStackKind()); Assert.assertEquals(locationIdentity, read.getLocationIdentity()); @@ -138,7 +138,7 @@ OffsetAddressNode address = (OffsetAddressNode) write.getAddress(); Assert.assertEquals(cast, address.getBase()); Assert.assertEquals(graph.getParameter(0), cast.getInput()); - Assert.assertEquals(target.wordKind, cast.stamp().getStackKind()); + Assert.assertEquals(target.wordJavaKind, cast.stamp().getStackKind()); Assert.assertEquals(locationIdentity, write.getLocationIdentity());
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Sep 16 12:05:27 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Sep 16 12:19:31 2015 +0200 @@ -129,7 +129,7 @@ } protected AddressNode createOffsetAddress(StructuredGraph graph, ValueNode object, long offset) { - ValueNode o = ConstantNode.forIntegerKind(target.wordKind, offset, graph); + ValueNode o = ConstantNode.forIntegerKind(target.wordJavaKind, offset, graph); return graph.unique(new OffsetAddressNode(object, o)); } @@ -201,7 +201,7 @@ ValueNode scaledIndex = graph.unique(new LeftShiftNode(wordIndex, ConstantNode.forInt(shift, graph))); int base = arrayBaseOffset(elementKind); - ValueNode offset = graph.unique(new AddNode(scaledIndex, ConstantNode.forIntegerKind(target.wordKind, base, graph))); + ValueNode offset = graph.unique(new AddNode(scaledIndex, ConstantNode.forIntegerKind(target.wordJavaKind, base, graph))); return graph.unique(new OffsetAddressNode(array, offset)); }
--- a/mx.graal/suite.py Wed Sep 16 12:05:27 2015 +0200 +++ b/mx.graal/suite.py Wed Sep 16 12:19:31 2015 +0200 @@ -6,7 +6,7 @@ "suites": [ { "name" : "jvmci", - "version" : "94a604f431d35ab5c0f6b3632d94c3b98d35e2ef", + "version" : "bfd5fdca1ce974ad6f88f77cd1f2b3b683e1fc2c", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},