Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java @ 10470:53ba9df05fa2
fixed remaining SPARC warnings using ecj
author | twisti |
---|---|
date | Fri, 21 Jun 2013 11:58:39 -0700 |
parents | 699ee4e4f9dc |
children | 73122b5edf6a |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Fri Jun 21 11:38:47 2013 -0700 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Fri Jun 21 11:58:39 2013 -0700 @@ -35,12 +35,10 @@ import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hotspot.stubs.Stub; import com.oracle.graal.lir.*; -import com.oracle.graal.lir.sparc.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.nodes.*; import static com.oracle.graal.sparc.SPARC.*; -import static com.oracle.graal.asm.sparc.SPARCAssembler.*; import static com.oracle.graal.asm.sparc.SPARCMacroAssembler.*; import static com.oracle.graal.api.code.CallingConvention.Type.*; import static com.oracle.graal.api.code.ValueUtil.*; @@ -71,16 +69,16 @@ */ protected static void emitStackOverflowCheck(TargetMethodAssembler tasm, boolean afterFrameInit) { if (StackShadowPages.getValue() > 0) { - SPARCMacroAssembler masm = (SPARCMacroAssembler) tasm.asm; + // SPARCMacroAssembler masm = (SPARCMacroAssembler) tasm.asm; final int frameSize = tasm.frameMap.frameSize(); if (frameSize > 0) { int lastFramePage = frameSize / unsafe.pageSize(); // emit multiple stack bangs for methods with frames larger than a page for (int i = 0; i <= lastFramePage; i++) { - int disp = (i + StackShadowPages.getValue()) * unsafe.pageSize(); - if (afterFrameInit) { - disp -= frameSize; - } + // int disp = (i + StackShadowPages.getValue()) * unsafe.pageSize(); + // if (afterFrameInit) { + // disp -= frameSize; + // } tasm.blockComment("[stack overflow check]"); // FIXME currently doesn't work; maybe frame size is wrong // new Ldx(new SPARCAddress(sp, -disp), g0).emit(masm); @@ -149,7 +147,7 @@ @Override public void emitCode(TargetMethodAssembler tasm, LIRGenerator lirGen, ResolvedJavaMethod installedCodeOwner) { - SPARCMacroAssembler asm = (SPARCMacroAssembler) tasm.asm; + SPARCMacroAssembler masm = (SPARCMacroAssembler) tasm.asm; FrameMap frameMap = tasm.frameMap; RegisterConfig regConfig = frameMap.registerConfig; HotSpotVMConfig config = runtime().config; @@ -164,12 +162,13 @@ Register receiver = asRegister(cc.getArgument(0)); SPARCAddress src = new SPARCAddress(receiver, config.hubOffset); -// new Ldx(asm, src, dst); -// new Cmp(asm, inlineCacheKlass, dst); - new Bpne(CC.Xcc, unverifiedStub).emit(asm); + new Ldx(src, g0).emit(masm); + new Cmp(inlineCacheKlass, g0).emit(masm); + new Bpne(CC.Xcc, unverifiedStub).emit(masm); + new Nop().emit(masm); // delay slot } - asm.align(config.codeEntryAlignment); + masm.align(config.codeEntryAlignment); tasm.recordMark(Marks.MARK_OSR_ENTRY); tasm.recordMark(Marks.MARK_VERIFIED_ENTRY); @@ -190,8 +189,9 @@ } if (unverifiedStub != null) { - asm.bind(unverifiedStub); + masm.bind(unverifiedStub); // SPARCCall.directJmp(tasm, asm, runtime().lookupForeignCall(IC_MISS_HANDLER)); + throw new InternalError("g0 must be scratch register"); } } }