diff options
Diffstat (limited to 'X64.hs')
-rw-r--r-- | X64.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -190,7 +190,7 @@ instance Stringifiable XRef where szword 2 = "word" szword 4 = "dword" szword 8 = "qword" - szword _ = undefined + szword s = error $ "Invalid (szword " ++ show s ++ ") in stringify XMem" stringify (XImm imm) = show imm @@ -283,6 +283,10 @@ xrefSetSize sz (XReg _ r) = XReg sz r xrefSetSize sz (XMem _ a b c d) = XMem sz a b c d xrefSetSize _ x@(XImm _) = x +offsetXMem :: Offset -> XRef -> XRef +offsetXMem off (XMem sz mr tup lbl o) = XMem sz mr tup lbl (o + off) +offsetXMem _ _ = undefined + isXReg :: XRef -> Bool isXReg (XReg _ _) = True isXReg _ = False |