X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Farm%2Fcodegen.c;h=abb5586a5ba05d9fc25f56c39b2b277fbf01c2b4;hb=db231fdbc6bc1d707018e2c26b9d83a78f6c8cbc;hp=f3ee6e3baad21bf81b41f29636c2abac1ccbdd1b;hpb=77f7be272bee8014af2f884c96972a1ba02ae11d;p=cacao.git diff --git a/src/vm/jit/arm/codegen.c b/src/vm/jit/arm/codegen.c index f3ee6e3ba..abb5586a5 100644 --- a/src/vm/jit/arm/codegen.c +++ b/src/vm/jit/arm/codegen.c @@ -129,7 +129,7 @@ bool codegen_emit(jitdata *jd) spilledregs_num = rd->memuse; #if defined(ENABLE_THREADS) /* space to save argument of monitor_enter */ - if (checksync && (m->flags & ACC_SYNCHRONIZED)) + if (checksync && code_is_synchronized(code)) spilledregs_num++; #endif @@ -147,18 +147,17 @@ bool codegen_emit(jitdata *jd) (void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */ (void) dseg_add_unique_s4(cd, cd->stackframesize); /* FrameSize */ -#if defined(ENABLE_THREADS) /* IsSync contains the offset relative to the stack pointer for the argument of monitor_exit used in the exception handler. Since the offset could be zero and give a wrong meaning of the flag it is offset by one. */ + /* XXX Remove this "offset by one". */ - if (checksync && (m->flags & ACC_SYNCHRONIZED)) - (void) dseg_add_unique_s4(cd, rd->memuse * 8 + 4);/* IsSync */ - else -#endif - (void) dseg_add_unique_s4(cd, 0); /* IsSync */ + code->synchronizedoffset = rd->memuse * 8 + 4; + + /* REMOVEME dummy IsSync */ + (void) dseg_add_unique_s4(cd, 0); /* REMOVEME: We still need it for exception handling in assembler. */ @@ -288,7 +287,7 @@ bool codegen_emit(jitdata *jd) #if defined(ENABLE_THREADS) /* call monitorenter function */ - if (checksync && (m->flags & ACC_SYNCHRONIZED)) { + if (checksync && code_is_synchronized(code)) { /* stack offset for monitor argument */ s1 = rd->memuse * 8; @@ -2126,7 +2125,7 @@ bool codegen_emit(jitdata *jd) #if defined(ENABLE_THREADS) /* call monitorexit function */ - if (checksync && (m->flags & ACC_SYNCHRONIZED)) { + if (checksync && code_is_synchronized(code)) { /* stack offset for monitor argument */ s1 = rd->memuse * 8;