From 11813f679be73c43142959b47ff4aeff386a1885 Mon Sep 17 00:00:00 2001 From: Klaus Treichel Date: Mon, 31 Dec 2007 13:42:09 +0000 Subject: [PATCH] Fix the call to jit_memcpy in jit_builtin_apply. --- ChangeLog | 5 +++++ jit/jit-apply-x86-64.h | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6de4065..e26c817 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-31 Klaus Treichel + + * jit/jit-apply-x86-64.h: Swap source and destination for the call of + jit_memcpy in jit_builtin_apply so that they are in the correct order. + 2007-12-28 Aleksey Demakov * jit/jit-interp.c: fix JIT_OP_LCMP_UN opcode. diff --git a/jit/jit-apply-x86-64.h b/jit/jit-apply-x86-64.h index 6ec4b77..af88131 100644 --- a/jit/jit-apply-x86-64.h +++ b/jit/jit-apply-x86-64.h @@ -49,9 +49,9 @@ /* * We have to add all registers not saved by the caller to the clobber list - * and not only the registers used for parameter passing because we do - * function calls. - * Maybe we should add the xmm* registers too? + * and not only the registers used for parameter passing because we call + * arbitrary functions. + * Maybe we should add the mmx* registers too? */ #define jit_builtin_apply(func,args,size,return_float,return_buf) \ do { \ @@ -62,10 +62,10 @@ (return_buf) = __return_buf; \ __asm__ ( \ "movq %1, %%rax\n\t" \ - "movq (%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rsi\n\t" \ "movq %2, %%rdx\n\t" \ "subq %%rdx, %%rsp\n\t" \ - "movq %%rsp, %%rsi\n\t" \ + "movq %%rsp, %%rdi\n\t" \ "callq " JIT_MEMCPY "\n\t" \ "movq %1, %%rax\n\t" \ "movq 0x08(%%rax), %%rdi\n\t" \ -- 2.47.3