Commit bb5c3f58 authored by Michael D. Adams's avatar Michael D. Adams
Browse files

Fix bug relating to the return values of prim ops

The return values were getting put in a LocalReg
but that LocalReg needed to be stored into the enclosing
expression's return register (e.g. R1).
parent 2955dc83
......@@ -162,7 +162,7 @@ cgExpr x@(StgOpApp op@(StgPrimOp primop) args res_ty)
| ReturnsPrim rep <- result_info
= do cgPrimOp [dataReturnConvPrim (primRepToCgRep rep)]
primop args emptyVarSet
performReturn emitReturnInstr
performPrimReturn (primRepToCgRep rep) (CmmReg (CmmLocal res))
| ReturnsAlg tycon <- result_info, isUnboxedTupleTyCon tycon
= do (reps, regs, _hints) <- newUnboxedTupleRegs res_ty
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment