Tue Jun 18 19:58:20 2013 UTC ()
Don't use register variables with Clang/amd64, provide assembler for
fetching/setting SP. Can't use the fast accessor as clisp doesn't align
in the stack correctly in that case. Still fails somewhere in the middle
of the regression tests, but much much farther in.


(joerg)
diff -r1.26 -r1.27 pkgsrc/lang/clisp/distinfo
diff -r0 -r1.1 pkgsrc/lang/clisp/patches/patch-src_lispbibl.d

cvs diff -r1.26 -r1.27 pkgsrc/lang/clisp/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/clisp/distinfo 2010/07/09 18:08:05 1.26
+++ pkgsrc/lang/clisp/distinfo 2013/06/18 19:58:20 1.27
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1$NetBSD: distinfo,v 1.26 2010/07/09 18:08:05 asau Exp $ 1$NetBSD: distinfo,v 1.27 2013/06/18 19:58:20 joerg Exp $
2 2
3SHA1 (clisp-2.49.tar.gz) = 1743e7917013162400c955af441e991db43b3323 3SHA1 (clisp-2.49.tar.gz) = 1743e7917013162400c955af441e991db43b3323
4RMD160 (clisp-2.49.tar.gz) = ae30f3b681cb023e885c6e4ed12210ee5ba14c76 4RMD160 (clisp-2.49.tar.gz) = ae30f3b681cb023e885c6e4ed12210ee5ba14c76
5Size (clisp-2.49.tar.gz) = 9823111 bytes 5Size (clisp-2.49.tar.gz) = 9823111 bytes
6SHA1 (patch-aa) = 1a0af21eb2c2de898a7cb3500ce72f15581bfeb8 6SHA1 (patch-aa) = 1a0af21eb2c2de898a7cb3500ce72f15581bfeb8
7SHA1 (patch-ab) = 225873ed24e4a1f343acc8e3163c8151e9958c77 7SHA1 (patch-ab) = 225873ed24e4a1f343acc8e3163c8151e9958c77
8SHA1 (patch-ac) = c31fcd65d7d37aeaf69c0eee9499bff596b6619b 8SHA1 (patch-ac) = c31fcd65d7d37aeaf69c0eee9499bff596b6619b
 9SHA1 (patch-src_lispbibl.d) = 122cdcc570065b7518b391d9433c5994c3925880

File Added: pkgsrc/lang/clisp/patches/patch-src_lispbibl.d
$NetBSD: patch-src_lispbibl.d,v 1.1 2013/06/18 19:58:20 joerg Exp $

--- src/lispbibl.d.orig	2013-06-17 14:15:17.000000000 +0000
+++ src/lispbibl.d
@@ -9090,6 +9090,15 @@ All other long words on the LISP-Stack a
   #define setSP(adresse)  \
     ({ __asm__ __volatile__ ("movel %0,"REGISTER_PREFIX"sp" : : "g" ((aint)(adresse)) : "sp" ); })
   #define FAST_SP
+#elif defined(__clang__) && defined(__x86_64__)
+  /* Access to a register-"variable" %rsp */
+  #define SP()  \
+    ({var aint __SP;                                           \
+      __asm__ __volatile__ ("movq %%rsp,%0" : "=g" (__SP) : ); \
+      __SP;                                                    \
+     })
+  #define setSP(adresse)  \
+      ({ __asm__ __volatile__ ("movq %0,%%rsp" : : "g" ((aint)(adresse)) : "sp" ); })
 #elif (defined(GNU) || defined(INTEL)) && defined(I80386) && !defined(NO_ASM)
   /* Access to a register-"variable" %esp */
   #define SP()  \