From: Ian Lynagh Date: Sat, 4 Apr 2009 00:34:45 +0000 (+0000) Subject: Don't use thread local storage on x86/not-Linux X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=20612276a81bc12ab6ed752f6c3ec19b4b57c8aa Don't use thread local storage on x86/not-Linux With the On x86, use thread-local storage instead of stealing a reg for gct patch, on Windows and OS X: error: thread-local storage not supported for this target --- diff --git a/rts/sm/GCThread.h b/rts/sm/GCThread.h index 5646edd..a274bb2 100644 --- a/rts/sm/GCThread.h +++ b/rts/sm/GCThread.h @@ -209,11 +209,11 @@ extern gc_thread **gc_threads; #define SET_GCT(to) gct = (to) -#if defined(sparc_HOST_ARCH) || defined(i386_HOST_ARCH) +#if defined(sparc_HOST_ARCH) || (defined(i386_HOST_ARCH) && defined(linux_HOST_OS)) // Don't use REG_base or R1 for gct on SPARC because they're getting clobbered // by something else. Not sure what yet. -- BL 2009/01/03 -// Using __thread is better than stealing a register on x86, because +// Using __thread is better than stealing a register on x86/Linux, because // we have too few registers available. In my tests it was worth // about 5% in GC performance, but of course that might change as gcc // improves. -- SDM 2009/04/03