+2007-12-31 Klaus Treichel <ktreichel@web.de>
+
+ * 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 <ademakov@gmail.com>
* jit/jit-interp.c: fix JIT_OP_LCMP_UN opcode.
/*
* 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 { \
(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" \