From e1001abdb4f7ff4d703fc3dc0d587f861e11740c Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 9 Jan 2006 10:31:14 +0000 Subject: [PATCH] [project @ 2006-01-09 10:31:14 by simonmar] ord# and chr# should be no-ops, not conversions between wordRep and I32. --- ghc/compiler/codeGen/CgPrimOp.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/codeGen/CgPrimOp.hs b/ghc/compiler/codeGen/CgPrimOp.hs index ccb252b..e59aafd 100644 --- a/ghc/compiler/codeGen/CgPrimOp.hs +++ b/ghc/compiler/codeGen/CgPrimOp.hs @@ -330,6 +330,8 @@ nopOp Int2WordOp = True nopOp Word2IntOp = True nopOp Int2AddrOp = True nopOp Addr2IntOp = True +nopOp ChrOp = True -- Int# and Char# are rep'd the same +nopOp OrdOp = True nopOp _ = False -- These PrimOps turn into double casts @@ -451,9 +453,6 @@ translateOp Float2IntOp = Just (MO_S_Conv F32 wordRep) translateOp Float2DoubleOp = Just (MO_S_Conv F32 F64) translateOp Double2FloatOp = Just (MO_S_Conv F64 F32) -translateOp OrdOp = Just (MO_U_Conv I32 wordRep) -translateOp ChrOp = Just (MO_U_Conv wordRep I32) - -- Word comparisons masquerading as more exotic things. translateOp SameMutVarOp = Just mo_wordEq -- 1.7.10.4