summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-02-02 11:44:17 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-02-02 11:44:17 +0000
commit26f4bfc82f2b2359259578e9c54d476fc2de650f (patch)
tree15a8d0717cb1e33e874f887d1b308a6fde671abf /rts
parentd0bfe30b668d5be86c00fe3635ef4f4dfe13a1f0 (diff)
downloadhaskell-26f4bfc82f2b2359259578e9c54d476fc2de650f.tar.gz
do a bit of by-hand CSE
Diffstat (limited to 'rts')
-rw-r--r--rts/PrimOps.cmm18
1 files changed, 11 insertions, 7 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 4f6c2526d4..8c5c14f335 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -1133,13 +1133,17 @@ stg_newMVarzh
}
-#define PerformTake(stack, value) \
- W_[StgStack_sp(stack) + WDS(1)] = value; \
- W_[StgStack_sp(stack) + WDS(0)] = stg_gc_unpt_r1_info;
-
-#define PerformPut(stack,lval) \
- StgStack_sp(stack) = StgStack_sp(stack) + WDS(3); \
- lval = W_[StgStack_sp(stack) - WDS(1)];
+#define PerformTake(stack, value) \
+ W_ sp; \
+ sp = StgStack_sp(stack); \
+ W_[sp + WDS(1)] = value; \
+ W_[sp + WDS(0)] = stg_gc_unpt_r1_info;
+
+#define PerformPut(stack,lval) \
+ W_ sp; \
+ sp = StgStack_sp(stack) + WDS(3); \
+ StgStack_sp(stack) = sp; \
+ lval = W_[sp - WDS(1)];
stg_takeMVarzh
{