Fixed AnalyseAsm so that it can parse negative literals in the assembly code
This commit is contained in:
parent
5450f77963
commit
4e6938e0ae
|
@ -78,6 +78,11 @@ parseAsmLine s
|
|||
incdecRE = mkRegex "^subl (.*), %esp$"
|
||||
|
||||
parseVal :: String -> Int
|
||||
-- The numbers can be negative:
|
||||
parseVal ('$':'-':s)
|
||||
= case readDec s of
|
||||
[(v, "")] -> -v
|
||||
_ -> error $ "Don't know how to parse assembly literal: -" ++ s
|
||||
parseVal ('$':s)
|
||||
= case readDec s of
|
||||
[(v, "")] -> v
|
||||
|
|
Loading…
Reference in New Issue
Block a user