@@ -32,7 +32,7 @@ class string:
3232)
3333
3434ASM_FUNCTION_ARM_RE = re .compile (
35- r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*@+[ \t]*@"?(?P=func)"?\n' # f: (name of function)
35+ r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*( @+[ \t]*@"?(?P=func)"?) ?\n' # f: (name of function)
3636 r"(?:\.L(?P=func)\$local:\n)?" # drop .L<func>$local:
3737 r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L<func>$local
3838 r"\s+\.fnstart\n" # .fnstart
@@ -42,11 +42,11 @@ class string:
4242)
4343
4444ASM_FUNCTION_AARCH64_RE = re .compile (
45- r'^_? (?P<func>[ ^:]+ ):[ \t]*\/\/[ \t]*@"?(?P=func)"?( (Function|Tail Call))?\n'
45+ r'^(?P<func>_?[a-zA-Z][ ^:]* ):[ \t]*( \/\/[ \t]*@"?(?P=func)"?) ?( (Function|Tail Call))?\n'
4646 r"(?:[ \t]+.cfi_startproc\n)?" # drop optional cfi noise
47- r"(?P<body>.*?)\n "
47+ r"(?P<body>.*?)"
4848 # This list is incomplete
49- r"^\s* (\.Lfunc_end[0-9]+|// -- End function)" ,
49+ r"^(\.Lfunc_end[0-9]+: |// -- End function)" ,
5050 flags = (re .M | re .S ),
5151)
5252
@@ -173,29 +173,29 @@ class string:
173173)
174174
175175ASM_FUNCTION_ARM_MACHO_RE = re .compile (
176- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
176+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
177177 r"([ \t]*.cfi_startproc\n[ \t]*)?"
178178 r"(?P<body>.*?)\n"
179179 r"[ \t]*\.cfi_endproc\n" ,
180180 flags = (re .M | re .S ),
181181)
182182
183183ASM_FUNCTION_THUMBS_DARWIN_RE = re .compile (
184- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
184+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
185185 r"(?P<body>.*?)\n"
186186 r"[ \t]*\.data_region\n" ,
187187 flags = (re .M | re .S ),
188188)
189189
190190ASM_FUNCTION_THUMB_DARWIN_RE = re .compile (
191- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
191+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
192192 r"(?P<body>.*?)\n"
193193 r"^[ \t]*@[ \t]--[ \t]End[ \t]function" ,
194194 flags = (re .M | re .S ),
195195)
196196
197197ASM_FUNCTION_ARM_IOS_RE = re .compile (
198- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
198+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
199199 r"(?P<body>.*?)"
200200 r"^[ \t]*@[ \t]--[ \t]End[ \t]function" ,
201201 flags = (re .M | re .S ),
0 commit comments