stg_ap_v_ret porting crash: solved?

Simon Marlow simonmar at microsoft.com
Fri Sep 19 11:25:58 EDT 2003


 
> Numerous additions to configure/configure.in. I can add these 
> in CVS, but I'm not sure if I should add
> 
> +s390-ibm-linux*)
> +       HostPlatform=s390-ibm-linux
> +       TargetPlatform=s390-ibm-linux #hack
> +       BuildPlatform=s390-ibm-linux #hack
> +        HostPlatform_CPP='s390_ibm_linux'
> +        HostArch_CPP='s390'
> +        HostVendor_CPP='ibm'
> +        HostOS_CPP='linux'
> +        ;;
> 
> as it is or with unknown instead of ibm?

Not a big deal, I'll leave this up to you.  I don't think we ever
discriminate based on the vendor.

> alpha:
> 
> --- ghc6-6.0.1.orig/ghc/includes/Stg.h
> +++ ghc6-6.0.1/ghc/includes/Stg.h
> @@ -33,6 +33,8 @@
>  # endif
>  #endif
> 
> +#include "TailCalls.h"
> +
>  /* Configuration */
>  #include "config.h"
> 
> @@ -186,7 +188,6 @@
>  #include "SMP.h"
>  #include "MachRegs.h"
>  #include "Regs.h"
> -#include "TailCalls.h"
>  #include "Block.h"
> 
>  /* RTS public interface */
> 
> 
> --- ghc6-6.0.1.orig/ghc/includes/TailCalls.h
> +++ ghc6-6.0.1/ghc/includes/TailCalls.h
> @@ -83,7 +83,9 @@
> 
>  #ifdef alpha_TARGET_ARCH
> 
> +#ifdef IN_STG_CODE
>  register void *_procedure __asm__("$27");
> +#endif
> 
>  #define JMP_(cont)                             \
>      do { _procedure = (void *)(cont);          \

I'm a bit suspicious about taking a whole register globally just to do
tailcalls.  Someone needs to investigate this.

> 
> alpha and hppa (probably):
> 
> --- ghc6-6.0.1.orig/ghc/includes/PrimOps.h
> +++ ghc6-6.0.1/ghc/includes/PrimOps.h
> @@ -254,7 +254,7 @@
>  EXTFUN_RTS(catchzh_fast);
>  EXTFUN_RTS(raisezh_fast);
> 
> -extern void stg_exit(I_ n)  __attribute__ ((noreturn));
> +extern void stg_exit(int n)  __attribute__ ((noreturn));

This has been fixed in the HEAD.

The other patches look fine: commit away, I'll merge into 6.2.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list