@@ -32,7 +32,7 @@ class string:
32
32
)
33
33
34
34
ASM_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)
36
36
r"(?:\.L(?P=func)\$local:\n)?" # drop .L<func>$local:
37
37
r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L<func>$local
38
38
r"\s+\.fnstart\n" # .fnstart
@@ -42,11 +42,11 @@ class string:
42
42
)
43
43
44
44
ASM_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'
46
46
r"(?:[ \t]+.cfi_startproc\n)?" # drop optional cfi noise
47
- r"(?P<body>.*?)\n "
47
+ r"(?P<body>.*?)"
48
48
# This list is incomplete
49
- r"^\s* (\.Lfunc_end[0-9]+|// -- End function)" ,
49
+ r"^(\.Lfunc_end[0-9]+: |// -- End function)" ,
50
50
flags = (re .M | re .S ),
51
51
)
52
52
@@ -173,29 +173,29 @@ class string:
173
173
)
174
174
175
175
ASM_FUNCTION_ARM_MACHO_RE = re .compile (
176
- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
176
+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
177
177
r"([ \t]*.cfi_startproc\n[ \t]*)?"
178
178
r"(?P<body>.*?)\n"
179
179
r"[ \t]*\.cfi_endproc\n" ,
180
180
flags = (re .M | re .S ),
181
181
)
182
182
183
183
ASM_FUNCTION_THUMBS_DARWIN_RE = re .compile (
184
- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
184
+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
185
185
r"(?P<body>.*?)\n"
186
186
r"[ \t]*\.data_region\n" ,
187
187
flags = (re .M | re .S ),
188
188
)
189
189
190
190
ASM_FUNCTION_THUMB_DARWIN_RE = re .compile (
191
- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
191
+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
192
192
r"(?P<body>.*?)\n"
193
193
r"^[ \t]*@[ \t]--[ \t]End[ \t]function" ,
194
194
flags = (re .M | re .S ),
195
195
)
196
196
197
197
ASM_FUNCTION_ARM_IOS_RE = re .compile (
198
- r'^_(?P<func>[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n'
198
+ r'^_(?P<func>[^:]+):[ \t]*( @[ \t]@"?(?P=func)"?) ?\n'
199
199
r"(?P<body>.*?)"
200
200
r"^[ \t]*@[ \t]--[ \t]End[ \t]function" ,
201
201
flags = (re .M | re .S ),
0 commit comments