+ let
+ do_enum_primop :: PrimOp -> FCode CAddrMode -- Returns amode for result
+ do_enum_primop TagToEnumOp -- No code!
+ = returnFC (only arg_amodes)
+
+ do_enum_primop primop
+ = absC (COpStmt [tag_amode] op arg_amodes vol_regs) `thenC`
+ returnFC tag_amode
+ where
+ tag_amode = CTemp (newTagUnique (getUnique bndr) 'C') IntRep
+ -- Being a bit short of uniques for temporary
+ -- variables here, we use newTagUnique to
+ -- generate a new unique from the case binder.
+ -- The case binder's unique will presumably
+ -- have the 'c' tag (generated by CoreToStg),
+ -- so we just change its tag to 'C' (for
+ -- 'case') to ensure it doesn't clash with
+ -- anything else. We can't use the unique
+ -- from the case binder, becaus e this is used
+ -- to hold the actual result closure (via the
+ -- call to bindNewToTemp)
+ in