From: twisti Date: Sat, 30 Apr 2005 20:12:59 +0000 (+0000) Subject: Bugfix for the _great_ x86_64 isa. Since %r12 is handled like %rsp, moves X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=9300fac58530f97fec3ae41a9b4f116dce2809ff;p=cacao.git Bugfix for the _great_ x86_64 isa. Since %r12 is handled like %rsp, moves with %r12 as base register are 1-byte longer. Arghh, i hate cisc... --- diff --git a/src/vm/jit/x86_64/patcher.c b/src/vm/jit/x86_64/patcher.c index 689640f48..b5356be98 100644 --- a/src/vm/jit/x86_64/patcher.c +++ b/src/vm/jit/x86_64/patcher.c @@ -28,7 +28,7 @@ Changes: - $Id: patcher.c 2424 2005-04-30 13:45:06Z jowenn $ + $Id: patcher.c 2426 2005-04-30 20:12:59Z twisti $ */ @@ -329,6 +329,11 @@ bool patcher_putfieldconst(u1 *sp) if (showdisassemble) ra = ra + 5; + /* handle special case when the base register is %r12 */ + + if (*(ra + 2) == 0x84) + ra = ra + 1; + /* patch the field's offset */ if (IS_2_WORD_TYPE(fi->type) || IS_ADR_TYPE(fi->type)) {