code->synchronizedoffset directly for all architectures.
* src/vm/jit/alpha/codegen.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/x86_64/codegen.c (codegen_emit): Set
code->synchronizedoffset to rd->memuse * 8.
if (code_is_synchronized(code)) {
/* Get synchronization object. */
-# if defined(__ARM__) || (defined(__MIPS__) && (SIZEOF_VOID_P == 4)) || defined(__I386__) || defined(__S390__) || defined(__POWERPC__)
- /* XXX change this if we ever want to use 4-byte stackslots */
- o = *((java_object_t **) (sp + code->synchronizedoffset - 8));
-# else
- o = *((java_object_t **) (sp + code->synchronizedoffset - SIZEOF_VOID_P));
-# endif
+ o = *((java_object_t **) (sp + code->synchronizedoffset));
assert(o != NULL);
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize); /* FrameSize */
- /* XXX Remove this "offset by one". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
framesize_disp = dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = JITSTACK + (rd->memuse + 1) * 8;
+ code->synchronizedoffset = JITSTACK + rd->memuse * 8;
/* REMOVEME: We still need it for exception handling in assembler. */
(void) dseg_add_unique_address(cd, code); /* CodeinfoPointer */
(void) dseg_add_unique_s4(cd, cd->stackframesize * 8); /* FrameSize */
- /* 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". */
-
- code->synchronizedoffset = (rd->memuse + 1) * 8;
+ code->synchronizedoffset = rd->memuse * 8;
if (code_is_leafmethod(code))
(void) dseg_add_unique_s4(cd, 1); /* IsLeaf */