#3557: CPU Vector instructions in GHC.Prim
---------------------------------+------------------------------------------
Reporter: guest | Owner: vivian
Type: feature request | Status: new
Priority: normal | Milestone: _|_
Component: Compiler (NCG) | Version: 6.11
Keywords: | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonmar):
I haven't followed all the discussion so far because I'm not all that
familiar with SSE etc., but I just wanted to make the point that we can't
have conditional compilation in primops.txt.pp based on the CPU type,
because the CPU on which you build GHC is not necessarily the same as the
one it runs on.
In fact, GHC is able to produce native code for any CPU, because we
compile in all the native backends (well, that's not strictly true,
because you can only have either the x86 or the x86_64 backend, not both,
but we should really fix that).
So no conditions: all the primops are visible on all platforms. If you
try to use an x86-specific primop with the Sparc backend, you'll get a
compile-time error. If you try to use an SSE3-specific primop on a non-
SSE3 CPU, the program will fail with an illegal instruction error, just as
if you use `-msse2` on x86 right now.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3557#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs