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.diff -r1.26 -r1.27 pkgsrc/lang/clisp/distinfo
(joerg)
@@ -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 | |||
3 | SHA1 (clisp-2.49.tar.gz) = 1743e7917013162400c955af441e991db43b3323 | 3 | SHA1 (clisp-2.49.tar.gz) = 1743e7917013162400c955af441e991db43b3323 | |
4 | RMD160 (clisp-2.49.tar.gz) = ae30f3b681cb023e885c6e4ed12210ee5ba14c76 | 4 | RMD160 (clisp-2.49.tar.gz) = ae30f3b681cb023e885c6e4ed12210ee5ba14c76 | |
5 | Size (clisp-2.49.tar.gz) = 9823111 bytes | 5 | Size (clisp-2.49.tar.gz) = 9823111 bytes | |
6 | SHA1 (patch-aa) = 1a0af21eb2c2de898a7cb3500ce72f15581bfeb8 | 6 | SHA1 (patch-aa) = 1a0af21eb2c2de898a7cb3500ce72f15581bfeb8 | |
7 | SHA1 (patch-ab) = 225873ed24e4a1f343acc8e3163c8151e9958c77 | 7 | SHA1 (patch-ab) = 225873ed24e4a1f343acc8e3163c8151e9958c77 | |
8 | SHA1 (patch-ac) = c31fcd65d7d37aeaf69c0eee9499bff596b6619b | 8 | SHA1 (patch-ac) = c31fcd65d7d37aeaf69c0eee9499bff596b6619b | |
9 | SHA1 (patch-src_lispbibl.d) = 122cdcc570065b7518b391d9433c5994c3925880 |
$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() \