]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Fix the call to jit_memcpy in jit_builtin_apply.
authorKlaus Treichel <ktreichel@web.de>
Mon, 31 Dec 2007 13:42:09 +0000 (13:42 +0000)
committerKlaus Treichel <ktreichel@web.de>
Mon, 31 Dec 2007 13:42:09 +0000 (13:42 +0000)
ChangeLog
jit/jit-apply-x86-64.h

index 6de40653fe88538d65fea93954450be1db218c1b..e26c8177a6dbddb1cf5b7ea3366637ced19cd039 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index 6ec4b770ffac483c50d43fa78e414643e861d3cb..af881319070d294fdae25231eb38e9f5a346046e 100644 (file)
@@ -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 { \
                        (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" \