aboutsummaryrefslogtreecommitdiff
path: root/X64.hs
diff options
context:
space:
mode:
Diffstat (limited to 'X64.hs')
-rw-r--r--X64.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/X64.hs b/X64.hs
index 26c35dd..0cbf4fc 100644
--- a/X64.hs
+++ b/X64.hs
@@ -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