# HG changeset patch # User Stefan Anzinger # Date 1406243009 25200 # Node ID b1af1727a783d1845a67b7801871bf62185f8f45 # Parent 78b8af271e86fb02d51575608c7f34ab6b567702 [SPARC] When handling with stackpointer register, we need to always add the stack bias as well diff -r 78b8af271e86 -r b1af1727a783 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Thu Jul 24 15:38:05 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Thu Jul 24 16:03:29 2014 -0700 @@ -254,7 +254,7 @@ // significant 2 bits cleared and page_size is a power of 2 final Word alignedMask = Word.unsigned(wordSize() - 1); final Word stackPointer = registerAsWord(stackPointerRegister); - if (probability(VERY_SLOW_PATH_PROBABILITY, currentMark.subtract(stackPointer).and(alignedMask.subtract(pageSize())).notEqual(0))) { + if (probability(VERY_SLOW_PATH_PROBABILITY, currentMark.subtract(stackPointer.add(config().stackBias)).and(alignedMask.subtract(pageSize())).notEqual(0))) { // Most likely not a recursive lock, go into a slow runtime call traceObject(trace, "+lock{stub:failed-cas}", object, true); monitorenterStubC(MONITORENTER, object, lock);