Hi, > +void emit_trace_invoke(struct buffer *buf, > + const char *class, const char *method, const char *type) > +{ > + __emit_push_imm(buf, (unsigned long) type); > + __emit_push_imm(buf, (unsigned long) method); > + __emit_push_imm(buf, (unsigned long) class); > + __emit_push_imm(buf, (unsigned long) "trace invoke: %s.%s%s\n"); > + __emit_call(buf, &printf); > + __emit_add_imm_reg(buf, 16, REG_ESP); > +}
This modifies %eax and the register allocator is not aware of it. However since you emit that at the beginning of a method, and %eax is a scratch register (caller saved), things should be fine. Lucky boy :) > +void emit_trace_invoke(struct buffer *buf, > + const char *class, const char *method, const char *type) > +{ > + __emit_push_imm(buf, (unsigned long) type); > + __emit_push_imm(buf, (unsigned long) method); > + __emit_push_imm(buf, (unsigned long) class); > + __emit_push_imm(buf, (unsigned long) "trace invoke: %s.%s%s\n"); > + __emit_call(buf, &printf); > + __emit_add_imm_reg(buf, 32, REG_RSP); > +} Aren't you redefining the function here? Does it build? Reviewed-By: Arthur Huillet -- Greetings, A.H. ------------------------------------------------------------------------------ _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel