From: Stas Boukarev Date: Mon, 4 Nov 2013 12:41:59 +0000 (+0400) Subject: Fix foreign-stack-alignment test on SPARC. X-Git-Url: http://repo.macrolet.net/gitweb/?p=sbcl.git;a=commitdiff_plain;h=2023abc03e7a8ab27efd814b936f87b75b704102 Fix foreign-stack-alignment test on SPARC. --- diff --git a/tests/foreign-stack-alignment.impure.lisp b/tests/foreign-stack-alignment.impure.lisp index c7b2b90..91e9378 100644 --- a/tests/foreign-stack-alignment.impure.lisp +++ b/tests/foreign-stack-alignment.impure.lisp @@ -36,7 +36,9 @@ #+mips 8 #+(and x86 (not darwin)) 4 #+(and x86 darwin) 16 - #-(or x86 x86-64 mips ppc) (error "Unknown platform")) + #+sparc 8 + #-(or x86 x86-64 mips ppc sparc) + (error "Unknown platform")) ;;;; Build the offset-tool as regular excutable, and run it with ;;;; fork/exec, so that no lisp is on the stack. This is our known-good @@ -59,6 +61,7 @@ (load-shared-object (truename "stack-alignment-offset.so")) (define-alien-routine stack-alignment-offset int (alignment int)) + #+alien-callbacks (define-alien-routine trampoline int (callback (function int)))) ;;;; Now get the offset by calling from lisp, first with a regular foreign function @@ -67,9 +70,11 @@ (with-test (:name :regular :fails-on :win32) (assert (= *good-offset* (stack-alignment-offset *required-alignment*)))) +#+alien-callbacks (with-test (:name :callback :fails-on :win32) - (assert (= *good-offset* (trampoline (alien-lambda int () - (stack-alignment-offset *required-alignment*)))))) + (assert (= *good-offset* + (trampoline (alien-lambda int () + (stack-alignment-offset *required-alignment*)))))) (when (probe-file "stack-alignment-offset.so") (delete-file "stack-alignment-offset")