In AnalyseAsm, ignore labels that contain "." anywhere.
GCC appears to generate labels that look like "constantname.1234" for some array constants.
This commit is contained in:
parent
b65512b64c
commit
3fcf363a31
|
@ -77,7 +77,7 @@ parseAsmLine s
|
||||||
-- digit.
|
-- digit.
|
||||||
parseLabel :: String -> Maybe AsmItem
|
parseLabel :: String -> Maybe AsmItem
|
||||||
parseLabel s@(c:cs)
|
parseLabel s@(c:cs)
|
||||||
| c == '.' || isDigit c = Nothing
|
| isDigit c || '.' `elem` s = Nothing
|
||||||
| last cs == ':' = Just $ AsmLabel (liat s)
|
| last cs == ':' = Just $ AsmLabel (liat s)
|
||||||
| otherwise = Nothing
|
| otherwise = Nothing
|
||||||
where
|
where
|
||||||
|
|
|
@ -57,6 +57,7 @@ testParse = TestList
|
||||||
|
|
||||||
, testLine 350 ".blah:" $ Nothing
|
, testLine 350 ".blah:" $ Nothing
|
||||||
, testLine 351 "0:" $ Nothing
|
, testLine 351 "0:" $ Nothing
|
||||||
|
, testLine 352 "blah.1234:" $ Nothing
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
testLine :: Int -> String -> Maybe AsmItem -> Test
|
testLine :: Int -> String -> Maybe AsmItem -> Test
|
||||||
|
|
Loading…
Reference in New Issue
Block a user