X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=includes%2FTailCalls.h;h=7927359ff185861553c4bca481ab50be750a13b1;hp=670da9546f75de9df447311bef7f9edbfd293f0e;hb=2d0adf8f0729cf8a4d988eaac48a480378b191ce;hpb=0e372faad1f903a06f830ca70a21dd82a8515845 diff --git a/includes/TailCalls.h b/includes/TailCalls.h index 670da95..7927359 100644 --- a/includes/TailCalls.h +++ b/includes/TailCalls.h @@ -242,6 +242,29 @@ but uses $$dyncall if necessary to cope, just in case you aren't. #endif /* ----------------------------------------------------------------------------- + Tail calling on MIPS + -------------------------------------------------------------------------- */ + +#ifdef mips_HOST_ARCH + +#if IN_STG_CODE +register void *_procedure __asm__("$25"); +#endif + +#define JMP_(cont) \ + { \ + _procedure = (void *)(cont); \ + __DISCARD__(); \ + goto *_procedure; \ + } + +/* Don't need these for MIPS mangling */ +#define FB_ +#define FE_ + +#endif /* mips_HOST_ARCH */ + +/* ----------------------------------------------------------------------------- FUNBEGIN and FUNEND. These are markers indicating the start and end of Real Code in a