Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22577/tests
Modified Files:
foreign.test.sh
Log Message:
0.18.19.10:
Refactor sign-extension of signed c-call return values on x86-64:
* Also sign extend short ints (fixes bug reported by Kevin Rosenberg
on sbcl-devel, "FFI size error in sbcl-amd64").
* Move the sign-extension to a :naturalize-gen alien-type-method.
* Remove signed-byte-32 ptype (used only for some sign-extension
hacks, which have now been removed).
* Add some tests.
Index: foreign.test.sh
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/foreign.test.sh,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- foreign.test.sh 19 Jan 2005 21:11:15 -0000 1.18
+++ foreign.test.sh 1 Feb 2005 03:00:04 -0000 1.19
@@ -37,6 +37,9 @@
echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c
echo 'int numberish = 42;' >> $testfilestem.c
echo 'int nummish(int x) { return numberish + x; }' >> $testfilestem.c
+echo 'short negative_short() { return -1; }' >> $testfilestem.c
+echo 'int negative_int() { return -2; }' >> $testfilestem.c
+echo 'long negative_long() { return -3; }' >> $testfilestem.c
build_so $testfilestem
echo 'int foo = 13;' > $testfilestem-b.c
@@ -72,6 +75,10 @@
(define-alien-variable "foo" int)
(define-alien-routine "bar" int)
+ (define-alien-routine "negative_short" short)
+ (define-alien-routine "negative_int" int)
+ (define-alien-routine "negative_long" long)
+
;; Test that loading an object file didn't screw up our records
;; of variables visible in runtime. (This was a bug until
;; Nikodemus Siivola's patch in sbcl-0.8.5.50.)
@@ -100,6 +107,10 @@
(assert (= 13 numberish))
(assert (= 14 (nummish 1)))
+ (assert (= -1 (negative-short)))
+ (assert (= -2 (negative-int)))
+ (assert (= -3 (negative-long)))
+
(print :stage-1)
;; test realoading object file with new definitions
|