[project @ 2003-11-02 06:55:24 by dons]
[ghc-hetmet.git] / ghc / rts / Adjustor.c
index ed3cb50..e9fc769 100644 (file)
@@ -73,7 +73,11 @@ static unsigned char __obscure_ccall_ret_code [] =
 
 #if defined(alpha_TARGET_ARCH)
 /* To get the definition of PAL_imb: */
-#include <machine/pal.h>
+# if defined(linux_TARGET_OS)
+#  include <asm/pal.h>
+# else
+#  include <machine/pal.h>
+# endif
 #endif
 
 #if defined(ia64_TARGET_ARCH)
@@ -366,7 +370,7 @@ TODO: Depending on how much allocation overhead stgMallocBytes uses for
                        while(n--)
                        {
                                __asm__ volatile ("dcbf 0,%0\n\tsync\n\ticbi 0,%0"
-                                                   : : "g" (p));
+                                                   : : "r" (p));
                                p++;
                        }
                        __asm__ volatile ("sync\n\tisync");
@@ -520,6 +524,6 @@ freeHaskellFunctionPtr(void* ptr)
 #endif
  *((unsigned char*)ptr) = '\0';
 
- free(ptr);
+ stgFree(ptr);
 }