summaryrefslogtreecommitdiff
path: root/compiler/cmm
diff options
context:
space:
mode:
authorGeoffrey Mainland <mainland@apeiron.net>2012-11-15 10:16:29 +0000
committerGeoffrey Mainland <gmainlan@microsoft.com>2013-02-01 22:00:24 +0000
commitcc56f34e71201e27e4e15af01a5a6258648d6a32 (patch)
treeed74568b892c8bf7466387424b4882e7379b68b0 /compiler/cmm
parent089ac7171bee938bd52975d2f828cf0dd6b4b25b (diff)
downloadhaskell-cc56f34e71201e27e4e15af01a5a6258648d6a32.tar.gz
Add prefetch primops.
Diffstat (limited to 'compiler/cmm')
-rw-r--r--compiler/cmm/CmmMachOp.hs4
-rw-r--r--compiler/cmm/PprC.hs1
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs
index 0f18029d20..fae84e5d53 100644
--- a/compiler/cmm/CmmMachOp.hs
+++ b/compiler/cmm/CmmMachOp.hs
@@ -517,6 +517,10 @@ data CallishMachOp
| MO_WriteBarrier
| MO_Touch -- Keep variables live (when using interior pointers)
+ -- Prefetch
+ | MO_Prefetch_Data -- Prefetch hint. May change program performance but not
+ -- program behavior.
+
-- Note that these three MachOps all take 1 extra parameter than the
-- standard C lib versions. The extra (last) parameter contains
-- alignment of the pointers. Used for optimisation in backends.
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index cda68ef39e..45c415f35a 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -759,6 +759,7 @@ pprCallishMachOp_for_C mop
MO_Add2 {} -> unsupported
MO_U_Mul2 {} -> unsupported
MO_Touch -> unsupported
+ MO_Prefetch_Data -> unsupported
where unsupported = panic ("pprCallishMachOp_for_C: " ++ show mop
++ " not supported!")