# HG changeset patch # User Tom Rodriguez # Date 1397237452 25200 # Node ID d1b948f9db3460ea5f3ecb838dc930cce38e5518 # Parent a4ed58c2a589a9f25c8af9050716f51374ffb24e restore compiledic assert until source of failures understood diff -r a4ed58c2a589 -r d1b948f9db34 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java Fri Apr 11 18:07:12 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java Fri Apr 11 10:30:52 2014 -0700 @@ -31,8 +31,8 @@ import com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind; /** - * A direct call that complies with the conventions for such calls in HotSpot. In particular, for - * calls using an inline cache, a MOVE instruction is emitted just prior to the aligned direct call. + * A direct call that complies with the conventions for such calls in HotSpot. It doesn't use an + * inline cache so it's just a patchable call site. */ @Opcode("CALL_DIRECT") final class AMD64HotspotDirectStaticCallOp extends DirectCallOp { diff -r a4ed58c2a589 -r d1b948f9db34 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java Fri Apr 11 18:07:12 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java Fri Apr 11 10:30:52 2014 -0700 @@ -101,8 +101,7 @@ assert invokeKind == InvokeKind.Static || invokeKind == InvokeKind.Special; HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) callTarget.target(); assert !Modifier.isAbstract(resolvedMethod.getModifiers()) : "Cannot make direct call to abstract method."; - Constant metaspaceMethod = resolvedMethod.getMetaspaceMethodConstant(); - append(new SPARCHotspotDirectStaticCallOp(callTarget.target(), result, parameters, temps, callState, invokeKind, metaspaceMethod)); + append(new SPARCHotspotDirectStaticCallOp(callTarget.target(), result, parameters, temps, callState, invokeKind)); } } diff -r a4ed58c2a589 -r d1b948f9db34 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java Fri Apr 11 18:07:12 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java Fri Apr 11 10:30:52 2014 -0700 @@ -22,44 +22,32 @@ */ package com.oracle.graal.hotspot.sparc; -import static com.oracle.graal.sparc.SPARC.*; - import com.oracle.graal.api.meta.*; import com.oracle.graal.asm.sparc.*; -import com.oracle.graal.asm.sparc.SPARCMacroAssembler.Setx; -import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.meta.HotSpotCodeCacheProvider.MarkId; import com.oracle.graal.lir.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.lir.sparc.SPARCCall.DirectCallOp; -import com.oracle.graal.lir.sparc.*; import com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind; /** - * A direct call that complies with the conventions for such calls in HotSpot. In particular, for - * calls using an inline cache, a MOVE instruction is emitted just prior to the aligned direct call. + * A direct call that complies with the conventions for such calls in HotSpot. It doesn't use an + * inline cache so it's just a patchable call site. */ @Opcode("CALL_DIRECT") final class SPARCHotspotDirectStaticCallOp extends DirectCallOp { - private final Constant metaspaceMethod; private final InvokeKind invokeKind; - SPARCHotspotDirectStaticCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind, Constant metaspaceMethod) { + SPARCHotspotDirectStaticCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind) { super(target, result, parameters, temps, state); assert invokeKind == InvokeKind.Static || invokeKind == InvokeKind.Special; - this.metaspaceMethod = metaspaceMethod; this.invokeKind = invokeKind; } @Override public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { - // The mark for an invocation that uses an inline cache must be placed at the - // instruction that loads the Klass from the inline cache. - SPARCMove.move(crb, masm, g5.asValue(Kind.Long), metaspaceMethod); MarkId.recordMark(crb, invokeKind == InvokeKind.Static ? MarkId.INVOKESTATIC : MarkId.INVOKESPECIAL); - // SPARCMove.move(crb, masm, g3.asValue(Kind.Long), Constant.LONG_0); - new Setx(HotSpotGraalRuntime.runtime().getConfig().nonOopBits, g3, true).emit(masm); super.emitCode(crb, masm); } } diff -r a4ed58c2a589 -r d1b948f9db34 src/share/vm/code/compiledIC.cpp --- a/src/share/vm/code/compiledIC.cpp Fri Apr 11 18:07:12 2014 +0200 +++ b/src/share/vm/code/compiledIC.cpp Fri Apr 11 10:30:52 2014 -0700 @@ -231,8 +231,8 @@ // for calling directly to vep without using the inline cache (i.e., cached_value == NULL) #ifdef ASSERT CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address()); - bool is_c1_method = caller->is_compiled_by_c1(); - assert( is_c1_method || + bool is_c1_or_graal_method = caller->is_compiled_by_c1() || caller->is_compiled_by_graal(); + assert( is_c1_or_graal_method || !is_monomorphic || is_optimized() || (cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check");