]> gitweb.factorcode.org Git - factor.git/commitdiff
fix powerpc typo
authorSlava Pestov <slava@factorcode.org>
Tue, 6 Sep 2005 00:33:36 +0000 (00:33 +0000)
committerSlava Pestov <slava@factorcode.org>
Tue, 6 Sep 2005 00:33:36 +0000 (00:33 +0000)
library/compiler/ppc/generator.factor
native/unix/ffi.c

index 87b99f061779b8ace6a61fc2774bdaad4b954dc0..587d941e3404415b8be6f5e0adc8a138b6a29dd2 100644 (file)
@@ -5,7 +5,7 @@ USING: alien assembler compiler inference kernel
 kernel-internals lists math memory namespaces words ;
 
 : compile-c-call ( symbol dll -- )
-    2dup dlsym  3 LOAD32  0 1 rel-dlsym  3 MTLR  BLRL ;
+    2dup dlsym  11 LOAD32  0 1 rel-dlsym  11 MTLR  BLRL ;
 
 M: %prologue generate-node ( vop -- )
     drop
index c9a195e0a2bef49d8042313d2785182eaf119aa0..d8e26720376416e1c924d7bebf3c44df73c33eac 100644 (file)
@@ -2,6 +2,26 @@
 
 static void *null_dll;
 
+void ffi_test_1(int x, int y, int z)
+{
+       fprintf(stderr,"%d %d %d\n",x,y,z);
+}
+
+void ffi_test_2(int x, float y, int z)
+{
+       fprintf(stderr,"%d %f %d\n",x,y,z);
+}
+
+int ffi_test_3(int x, int y, int z)
+{
+       return x + y * z;
+}
+
+float ffi_test_4(int x, float y, int z)
+{
+       return x + y * z;
+}
+
 void init_ffi(void)
 {
        null_dll = dlopen(NULL,RTLD_LAZY);