diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-09-01 18:14:43 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-09-01 18:15:25 +0200 |
commit | 19c70b8eaa1126f1648b009d99092432a5c88059 (patch) | |
tree | bd4171a4d6ef5e8ae2b09e1c84bf3e2346374e97 /X64.hs | |
parent | 3d5d85e00f2a81efb62bb17f8e5db63fe5a49a61 (diff) |
Structs + typedefs
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 |