X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FCOptWraps.lh;fp=ghc%2Fincludes%2FCOptWraps.lh;h=409693b811830ff8243c7f4dba2abb9c67999378;hb=66982e0f7224becdb8f70ada0ec71b758e393edd;hp=27c862fdf987016e3b041cb4965d7c4eed7e72e3;hpb=1119f4612631e3df2eb704dbde8b3d7625f0a477;p=ghc-hetmet.git diff --git a/ghc/includes/COptWraps.lh b/ghc/includes/COptWraps.lh index 27c862f..409693b 100644 --- a/ghc/includes/COptWraps.lh +++ b/ghc/includes/COptWraps.lh @@ -576,6 +576,13 @@ gets whatever it's after. #define WRAPPER_NAME(f) /* nothing */ +#define SET_RETADDR(loc) \ + __asm__ volatile ( \ + "mflr 0\n" \ + "\tst 0,%0" \ + :"=m" (loc) :: "0"); +/* __asm__ volatile ("st %%r0, %0" : "=m" ((void *)(loc))); */ + #define WRAPPER_SETUP(f,ignore1,ignore2) SaveAllStgContext(); /* we have to make sure the STG registers are restored.