Authors: Andreas Krall
Reinhard Grafl
- $Id: codegen.c 1218 2004-06-29 14:11:16Z twisti $
+ $Id: codegen.c 1270 2004-07-03 10:32:02Z stefan $
*/
#if defined(USE_THREADS)
if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
s4 disp;
- p = dseg_addaddress((void*) (builtin_monitorenter));
+ s8 func_enter = (method->flags & ACC_STATIC) ?
+ (s8) builtin_staticmonitorenter : (s8) builtin_monitorenter;
+ p = dseg_addaddress((void*) func_enter);
M_ALD(REG_PV, REG_PV, p);
M_ALD(argintregs[0], REG_SP, maxmemuse * 8);
M_JSR(REG_RA, REG_PV);
Authors: Andreas Krall
Christian Thalinger
- $Id: codegen.c 1258 2004-06-30 21:35:11Z twisti $
+ $Id: codegen.c 1270 2004-07-03 10:32:02Z stefan $
*/
/* save monitorenter argument */
#if defined(USE_THREADS)
+ s4 func_enter = (m->flags & ACC_STATIC) ?
+ (s4) builtin_staticmonitorenter : (s4) builtin_monitorenter;
+
if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
if (m->flags & ACC_STATIC) {
i386_mov_imm_reg((s4) m->class, REG_ITMP1);
i386_alu_imm_reg(I386_SUB, 4, REG_SP);
i386_mov_reg_membase(REG_ITMP1, REG_SP, 0);
- i386_mov_imm_reg((s4) builtin_monitorenter, REG_ITMP1);
+ i386_mov_imm_reg(func_enter, REG_ITMP1);
i386_call_reg(REG_ITMP1);
i386_alu_imm_reg(I386_ADD, 4, REG_SP);
}
Authors: Andreas Krall
Reinhard Grafl
- $Id: codegen.c 1218 2004-06-29 14:11:16Z twisti $
+ $Id: codegen.c 1270 2004-07-03 10:32:02Z stefan $
*/
#if defined(USE_THREADS)
if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
s4 disp;
- p = dseg_addaddress((void*) (builtin_monitorenter));
+ s8 func_enter = (method->flags & ACC_STATIC) ?
+ (s8) builtin_staticmonitorenter : (s8) builtin_monitorenter;
+ p = dseg_addaddress((void*) func_enter);
M_ALD(REG_PV, REG_PV, p);
M_ALD(argintregs[0], REG_SP, maxmemuse * 8);
M_JSR(REG_RA, REG_PV);
Authors: Andreas Krall
Christian Thalinger
- $Id: codegen.c 1258 2004-06-30 21:35:11Z twisti $
+ $Id: codegen.c 1270 2004-07-03 10:32:02Z stefan $
*/
/* save monitorenter argument */
#if defined(USE_THREADS)
+ s4 func_enter = (m->flags & ACC_STATIC) ?
+ (s4) builtin_staticmonitorenter : (s4) builtin_monitorenter;
+
if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
if (m->flags & ACC_STATIC) {
i386_mov_imm_reg((s4) m->class, REG_ITMP1);
i386_alu_imm_reg(I386_SUB, 4, REG_SP);
i386_mov_reg_membase(REG_ITMP1, REG_SP, 0);
- i386_mov_imm_reg((s4) builtin_monitorenter, REG_ITMP1);
+ i386_mov_imm_reg(func_enter, REG_ITMP1);
i386_call_reg(REG_ITMP1);
i386_alu_imm_reg(I386_ADD, 4, REG_SP);
}