Commit 26a928b8 authored by John Ericson's avatar John Ericson Committed by Marge Bot

Rename internal primpos ahead of !4492

I'm not sure how long the submodule dance is going to take, sadly, so
I'd like to chip away at things in the meantime / avoid conflicts.
parent 0a265624
Pipeline #29603 failed with stages
in 951 minutes and 25 seconds
......@@ -291,8 +291,8 @@ section "Int8#"
primtype Int8#
primop Int8ExtendOp "extendInt8#" GenPrimOp Int8# -> Int#
primop Int8NarrowOp "narrowInt8#" GenPrimOp Int# -> Int8#
primop Int8ToIntOp "extendInt8#" GenPrimOp Int8# -> Int#
primop IntToInt8Op "narrowInt8#" GenPrimOp Int# -> Int8#
primop Int8NegOp "negateInt8#" GenPrimOp Int8# -> Int8#
......@@ -332,8 +332,8 @@ section "Word8#"
primtype Word8#
primop Word8ExtendOp "extendWord8#" GenPrimOp Word8# -> Word#
primop Word8NarrowOp "narrowWord8#" GenPrimOp Word# -> Word8#
primop Word8ToWordOp "extendWord8#" GenPrimOp Word8# -> Word#
primop WordToWord8Op "narrowWord8#" GenPrimOp Word# -> Word8#
primop Word8NotOp "notWord8#" GenPrimOp Word8# -> Word8#
......@@ -373,8 +373,8 @@ section "Int16#"
primtype Int16#
primop Int16ExtendOp "extendInt16#" GenPrimOp Int16# -> Int#
primop Int16NarrowOp "narrowInt16#" GenPrimOp Int# -> Int16#
primop Int16ToIntOp "extendInt16#" GenPrimOp Int16# -> Int#
primop IntToInt16Op "narrowInt16#" GenPrimOp Int# -> Int16#
primop Int16NegOp "negateInt16#" GenPrimOp Int16# -> Int16#
......@@ -414,8 +414,8 @@ section "Word16#"
primtype Word16#
primop Word16ExtendOp "extendWord16#" GenPrimOp Word16# -> Word#
primop Word16NarrowOp "narrowWord16#" GenPrimOp Word# -> Word16#
primop Word16ToWordOp "extendWord16#" GenPrimOp Word16# -> Word#
primop WordToWord16Op "narrowWord16#" GenPrimOp Word# -> Word16#
primop Word16NotOp "notWord16#" GenPrimOp Word16# -> Word16#
......@@ -455,8 +455,8 @@ section "Int32#"
primtype Int32#
primop Int32ExtendOp "extendInt32#" GenPrimOp Int32# -> Int#
primop Int32NarrowOp "narrowInt32#" GenPrimOp Int# -> Int32#
primop Int32ToIntOp "extendInt32#" GenPrimOp Int32# -> Int#
primop IntToInt32Op "narrowInt32#" GenPrimOp Int# -> Int32#
------------------------------------------------------------------------
section "Word32#"
......@@ -465,8 +465,8 @@ section "Word32#"
primtype Word32#
primop Word32ExtendOp "extendWord32#" GenPrimOp Word32# -> Word#
primop Word32NarrowOp "narrowWord32#" GenPrimOp Word# -> Word32#
primop Word32ToWordOp "extendWord32#" GenPrimOp Word32# -> Word#
primop WordToWord32Op "narrowWord32#" GenPrimOp Word# -> Word32#
#if WORD_SIZE_IN_BITS < 64
------------------------------------------------------------------------
......
......@@ -198,43 +198,43 @@ primOpRules nm = \case
-- coercions
Int8ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
Int16ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
Int32ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
Int8NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowInt8Lit
, subsumedByPrimOp Int8NarrowOp
, narrowSubsumesAnd IntAndOp Int8NarrowOp 8 ]
Int16NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowInt16Lit
, subsumedByPrimOp Int8NarrowOp
, subsumedByPrimOp Int16NarrowOp
, narrowSubsumesAnd IntAndOp Int16NarrowOp 16 ]
Int32NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowInt32Lit
, subsumedByPrimOp Int8NarrowOp
, subsumedByPrimOp Int16NarrowOp
, subsumedByPrimOp Int32NarrowOp
, narrowSubsumesAnd IntAndOp Int32NarrowOp 32 ]
Word8ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough Word8NarrowOp 0xFF
Int8ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
Int16ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
Int32ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
IntToInt8Op -> mkPrimOpRule nm 1 [ liftLit narrowInt8Lit
, subsumedByPrimOp IntToInt8Op
, narrowSubsumesAnd IntAndOp IntToInt8Op 8 ]
IntToInt16Op -> mkPrimOpRule nm 1 [ liftLit narrowInt16Lit
, subsumedByPrimOp IntToInt8Op
, subsumedByPrimOp IntToInt16Op
, narrowSubsumesAnd IntAndOp IntToInt16Op 16 ]
IntToInt32Op -> mkPrimOpRule nm 1 [ liftLit narrowInt32Lit
, subsumedByPrimOp IntToInt8Op
, subsumedByPrimOp IntToInt16Op
, subsumedByPrimOp IntToInt32Op
, narrowSubsumesAnd IntAndOp IntToInt32Op 32 ]
Word8ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough WordToWord8Op 0xFF
]
Word16ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough Word16NarrowOp 0xFFFF
Word16ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough WordToWord16Op 0xFFFF
]
Word32ExtendOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough Word32NarrowOp 0xFFFFFFFF
Word32ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
, extendNarrowPassthrough WordToWord32Op 0xFFFFFFFF
]
Word8NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowWord8Lit
, subsumedByPrimOp Word8NarrowOp
, narrowSubsumesAnd WordAndOp Word8NarrowOp 8 ]
Word16NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowWord16Lit
, subsumedByPrimOp Word8NarrowOp
, subsumedByPrimOp Word16NarrowOp
, narrowSubsumesAnd WordAndOp Word16NarrowOp 16 ]
Word32NarrowOp -> mkPrimOpRule nm 1 [ liftLit narrowWord32Lit
, subsumedByPrimOp Word8NarrowOp
, subsumedByPrimOp Word16NarrowOp
, subsumedByPrimOp Word32NarrowOp
, narrowSubsumesAnd WordAndOp Word32NarrowOp 32 ]
WordToWord8Op -> mkPrimOpRule nm 1 [ liftLit narrowWord8Lit
, subsumedByPrimOp WordToWord8Op
, narrowSubsumesAnd WordAndOp WordToWord8Op 8 ]
WordToWord16Op -> mkPrimOpRule nm 1 [ liftLit narrowWord16Lit
, subsumedByPrimOp WordToWord8Op
, subsumedByPrimOp WordToWord16Op
, narrowSubsumesAnd WordAndOp WordToWord16Op 16 ]
WordToWord32Op -> mkPrimOpRule nm 1 [ liftLit narrowWord32Lit
, subsumedByPrimOp WordToWord8Op
, subsumedByPrimOp WordToWord16Op
, subsumedByPrimOp WordToWord32Op
, narrowSubsumesAnd WordAndOp WordToWord32Op 32 ]
WordToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform (litNumCoerce LitNumInt)
......
......@@ -1195,8 +1195,8 @@ emitPrimOp dflags primop = case primop of
-- Int8# signed ops
Int8ExtendOp -> \args -> opTranslate args (MO_SS_Conv W8 (wordWidth platform))
Int8NarrowOp -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W8)
Int8ToIntOp -> \args -> opTranslate args (MO_SS_Conv W8 (wordWidth platform))
IntToInt8Op -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W8)
Int8NegOp -> \args -> opTranslate args (MO_S_Neg W8)
Int8AddOp -> \args -> opTranslate args (MO_Add W8)
Int8SubOp -> \args -> opTranslate args (MO_Sub W8)
......@@ -1213,8 +1213,8 @@ emitPrimOp dflags primop = case primop of
-- Word8# unsigned ops
Word8ExtendOp -> \args -> opTranslate args (MO_UU_Conv W8 (wordWidth platform))
Word8NarrowOp -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W8)
Word8ToWordOp -> \args -> opTranslate args (MO_UU_Conv W8 (wordWidth platform))
WordToWord8Op -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W8)
Word8NotOp -> \args -> opTranslate args (MO_Not W8)
Word8AddOp -> \args -> opTranslate args (MO_Add W8)
Word8SubOp -> \args -> opTranslate args (MO_Sub W8)
......@@ -1231,8 +1231,8 @@ emitPrimOp dflags primop = case primop of
-- Int16# signed ops
Int16ExtendOp -> \args -> opTranslate args (MO_SS_Conv W16 (wordWidth platform))
Int16NarrowOp -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W16)
Int16ToIntOp -> \args -> opTranslate args (MO_SS_Conv W16 (wordWidth platform))
IntToInt16Op -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W16)
Int16NegOp -> \args -> opTranslate args (MO_S_Neg W16)
Int16AddOp -> \args -> opTranslate args (MO_Add W16)
Int16SubOp -> \args -> opTranslate args (MO_Sub W16)
......@@ -1249,8 +1249,8 @@ emitPrimOp dflags primop = case primop of
-- Word16# unsigned ops
Word16ExtendOp -> \args -> opTranslate args (MO_UU_Conv W16 (wordWidth platform))
Word16NarrowOp -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W16)
Word16ToWordOp -> \args -> opTranslate args (MO_UU_Conv W16 (wordWidth platform))
WordToWord16Op -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W16)
Word16NotOp -> \args -> opTranslate args (MO_Not W16)
Word16AddOp -> \args -> opTranslate args (MO_Add W16)
Word16SubOp -> \args -> opTranslate args (MO_Sub W16)
......@@ -1267,13 +1267,13 @@ emitPrimOp dflags primop = case primop of
-- Int32# signed ops
Int32ExtendOp -> \args -> opTranslate args (MO_SS_Conv W32 (wordWidth platform))
Int32NarrowOp -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W32)
Int32ToIntOp -> \args -> opTranslate args (MO_SS_Conv W32 (wordWidth platform))
IntToInt32Op -> \args -> opTranslate args (MO_SS_Conv (wordWidth platform) W32)
-- Word32# unsigned ops
Word32ExtendOp -> \args -> opTranslate args (MO_UU_Conv W32 (wordWidth platform))
Word32NarrowOp -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W32)
Word32ToWordOp -> \args -> opTranslate args (MO_UU_Conv W32 (wordWidth platform))
WordToWord32Op -> \args -> opTranslate args (MO_UU_Conv (wordWidth platform) W32)
-- Char# ops
......
Markdown is supported
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