* storage manager: preserve upper address bits on 64bit machines (thanks to zygoloid)
* storage manager: preserve upper address bits on 64bit machines (thanks to zygoloid)

Patch does not touch amd64 as it's address lengts is 48 bits at most, so amd64 is unaffected.

the issue: during ia64 ghc bootstrap (both 6.10.4 and 6.12.3) I
got the failure on stage2 phase:
    "inplace/bin/ghc-stage2"   -H32m -O -H64m -O0 -w ...
    ghc-stage2: internal error: evacuate: strange closure type 15
        (GHC version 6.12.3 for ia64_unknown_linux)
        Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
    make[1]: *** [libraries/dph/dph-base/dist-install/build/Data/Array/Parallel/Base/Hyperstrict.o] Aborted

gdb backtrace (break on 'barf'):
Breakpoint 1 at 0x400000000469ec31: file rts/RtsMessages.c, line 39.
(gdb) run -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
Starting program: /var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/lib/ghc-stage2 -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
[Thread debugging using libthread_db enabled]

Breakpoint 1, barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
39        va_start(ap,s);
(gdb) bt
#0  barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
#1  0x400000000474a1e0 in evacuate (p=0x6000000000147958) at rts/sm/Evac.c:756
#2  0x40000000046d68c0 in scavenge_srt (srt=0x6000000000147958, srt_bitmap=7) at rts/sm/Scav.c:348
...

> 16:52:53 < zygoloid> slyfox: i'm no ghc expert but it looks like HEAP_ALLOCED_GC(q)
>                      is returning true for a FUN_STATIC closure
> 17:18:43 < zygoloid> try: p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> (gdb) p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> $1 = 0
> 17:19:40 < zygoloid> i /think/ that means the mblock_cache is broken
> 17:22:45 < zygoloid> i can't help further. however i am suspicious that you seem to have pointers with similar-looking low 33
>                      bits and different high 4 bits, and it looks like such pointers get put into the same bucket in
>                      mblock_cache.
...
> 17:36:16 < zygoloid> slyfox: try changing the definition of MbcCacheLine to StgWord64, see if that helps
> 17:36:31 < zygoloid> that's in includes/rts/storage/MBlock.h
And it helped!

AlexanderPankiv/ghc,shlevy/ghc,TomMD/ghc,frantisekfarka/ghc-dsi,TomMD/ghc,olsner/ghc,sdiehl/ghc,mfine/ghc,ekmett/ghc,olsner/ghc,nathyong/microghc-ghc,frantisekfarka/ghc-dsi,vikraman/ghc,da-x/ghc,ezyang/ghc,GaloisInc/halvm-ghc,frantisekfarka/ghc-dsi,mcschroeder/ghc,nathyong/microghc-ghc,bitemyapp/ghc,wxwxwwxxx/ghc,mfine/ghc,olsner/ghc,tibbe/ghc,jstolarek/ghc,ml9951/ghc,gridaphobe/ghc,ryantm/ghc,GaloisInc/halvm-ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,nkaretnikov/ghc,vTurbine/ghc,holzensp/ghc,lukexi/ghc-7.8-arm64,lukexi/ghc-7.8-arm64,ezyang/ghc,snoyberg/ghc,lukexi/ghc,acowley/ghc,gridaphobe/ghc,nkaretnikov/ghc,sdiehl/ghc,green-haskell/ghc,jstolarek/ghc,AlexanderPankiv/ghc,ml9951/ghc,ml9951/ghc,sgillespie/ghc,ghc-android/ghc,hferreiro/replay,ml9951/ghc,fmthoma/ghc,vikraman/ghc,mcschroeder/ghc,spacekitteh/smcghc,shlevy/ghc,mettekou/ghc,shlevy/ghc,gcampax/ghc,ilyasergey/GHC-XAppFix,ryantm/ghc,anton-dessiatov/ghc,green-haskell/ghc,urbanslug/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,ml9951/ghc,sgillespie/ghc,vTurbine/ghc,wxwxwwxxx/ghc,tjakway/ghcjvm,sdiehl/ghc,hferreiro/replay,bitemyapp/ghc,lukexi/ghc-7.8-arm64,lukexi/ghc,christiaanb/ghc,nushio3/ghc,AlexanderPankiv/ghc,TomMD/ghc,mcschroeder/ghc,mfine/ghc,nathyong/microghc-ghc,elieux/ghc,fmthoma/ghc,ghc-android/ghc,vTurbine/ghc,shlevy/ghc,siddhanathan/ghc,forked-upstream-packages-for-ghcjs/ghc,mettekou/ghc,wxwxwwxxx/ghc,lukexi/ghc-7.8-arm64,sdiehl/ghc,oldmanmike/ghc,frantisekfarka/ghc-dsi,acowley/ghc,ryantm/ghc,ilyasergey/GHC-XAppFix,lukexi/ghc,ghc-android/ghc,snoyberg/ghc,anton-dessiatov/ghc,olsner/ghc,jstolarek/ghc,gcampax/ghc,forked-upstream-packages-for-ghcjs/ghc,christiaanb/ghc,spacekitteh/smcghc,hferreiro/replay,bitemyapp/ghc,nushio3/ghc,holzensp/ghc,mfine/ghc,tibbe/ghc,sgillespie/ghc,christiaanb/ghc,GaloisInc/halvm-ghc,TomMD/ghc,bitemyapp/ghc,AlexanderPankiv/ghc,nkaretnikov/ghc,holzensp/ghc,nushio3/ghc,AlexanderPankiv/ghc,ml9951/ghc,siddhanathan/ghc,nathyong/microghc-ghc,spacekitteh/smcghc,acowley/ghc,oldmanmike/ghc,mcschroeder/ghc,snoyberg/ghc,forked-upstream-packages-for-ghcjs/ghc,TomMD/ghc,siddhanathan/ghc,oldmanmike/ghc,nkaretnikov/ghc,da-x/ghc,vikraman/ghc,tjakway/ghcjvm,ezyang/ghc,elieux/ghc,christiaanb/ghc,tibbe/ghc,mcschroeder/ghc,sgillespie/ghc,nushio3/ghc,mcmaniac/ghc,vikraman/ghc,ghc-android/ghc,gridaphobe/ghc,olsner/ghc,mettekou/ghc,nomeata/ghc,shlevy/ghc,olsner/ghc,elieux/ghc,urbanslug/ghc,hferreiro/replay,tibbe/ghc,fmthoma/ghc,elieux/ghc,vikraman/ghc,oldmanmike/ghc,vTurbine/ghc,AlexanderPankiv/ghc,acowley/ghc,TomMD/ghc,nomeata/ghc,mfine/ghc,snoyberg/ghc,elieux/ghc,anton-dessiatov/ghc,urbanslug/ghc,bitemyapp/ghc,vTurbine/ghc,sdiehl/ghc,fmthoma/ghc,green-haskell/ghc,oldmanmike/ghc,gcampax/ghc,olsner/ghc,mfine/ghc,nushio3/ghc,snoyberg/ghc,acowley/ghc,hferreiro/replay,AlexanderPankiv/ghc,anton-dessiatov/ghc,nomeata/ghc,mcmaniac/ghc,mcschroeder/ghc,oldmanmike/ghc,GaloisInc/halvm-ghc,nushio3/ghc,nomeata/ghc,da-x/ghc,ml9951/ghc,nkaretnikov/ghc,jstolarek/ghc,TomMD/ghc,wxwxwwxxx/ghc,ryantm/ghc,gcampax/ghc,wxwxwwxxx/ghc,siddhanathan/ghc,holzensp/ghc,urbanslug/ghc,nkaretnikov/ghc,vikraman/ghc,tjakway/ghcjvm,mettekou/ghc,da-x/ghc,ezyang/ghc,mcmaniac/ghc,snoyberg/ghc,vTurbine/ghc,ghc-android/ghc,vikraman/ghc,mfine/ghc,GaloisInc/halvm-ghc,da-x/ghc,ekmett/ghc,siddhanathan/ghc,anton-dessiatov/ghc,gridaphobe/ghc,fmthoma/ghc,siddhanathan/ghc,ezyang/ghc,sgillespie/ghc,mcmaniac/ghc,snoyberg/ghc,ryantm/ghc,gcampax/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,nushio3/ghc,sdiehl/ghc,GaloisInc/halvm-ghc,forked-upstream-packages-for-ghcjs/ghc,mettekou/ghc,hferreiro/replay,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,acowley/ghc,mcschroeder/ghc,urbanslug/ghc,nomeata/ghc,hferreiro/replay,lukexi/ghc,christiaanb/ghc,mettekou/ghc,shlevy/ghc,sgillespie/ghc,christiaanb/ghc,green-haskell/ghc,ekmett/ghc,spacekitteh/smcghc,mcmaniac/ghc,mettekou/ghc,tibbe/ghc,nathyong/microghc-ghc,acowley/ghc,ghc-android/ghc,ilyasergey/GHC-XAppFix,wxwxwwxxx/ghc,anton-dessiatov/ghc,ezyang/ghc,vTurbine/ghc,tjakway/ghcjvm,frantisekfarka/ghc-dsi,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc,gcampax/ghc,gridaphobe/ghc,nathyong/microghc-ghc,gcampax/ghc,lukexi/ghc-7.8-arm64,shlevy/ghc,christiaanb/ghc,jstolarek/ghc,tjakway/ghcjvm,oldmanmike/ghc,holzensp/ghc,tjakway/ghcjvm,urbanslug/ghc,ml9951/ghc,da-x/ghc,ilyasergey/GHC-XAppFix,da-x/ghc,elieux/ghc,elieux/ghc,wxwxwwxxx/ghc,tjakway/ghcjvm,ezyang/ghc,ekmett/ghc,ekmett/ghc,siddhanathan/ghc,gridaphobe/ghc,spacekitteh/smcghc,fmthoma/ghc,green-haskell/ghc,sdiehl/ghc,ghc-android/ghc,fmthoma/ghc,nkaretnikov/ghc