Lines Matching +full:r +full:- +full:- +full:p
19 # The set of per-arch regular expressions define several groups.
25 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*(@"?(?P=func)"?| -- Begin function (?P=func))\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?'
26 r"(?:\.L(?P=func)\$local:\n)?" # drop .L<func>$local:
27 r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L<func>$local
28 r"(?:[ \t]*(?:\.cfi_startproc|\.cfi_personality|\.cfi_lsda|\.seh_proc|\.seh_handler)\b[^\n]*\n)*" # drop optional cfi
29 r"(?P<body>^##?[ \t]+[^:]+:.*?)\s*"
30 r"^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|#+ -- End function)",
35 r"^(?P<func>[0-9a-zA-Z_$]+):\n" # f: (name of function)
36 r"(?:\.L(?P=func)\$local:\n)?" # drop .L<func>$local:
37 r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L<func>$local
38 r"\s+\.fnstart\n" # .fnstart
39 r"(?P<body>.*?)" # (body of the function)
40 r"^.Lfunc_end[0-9]+:", # .Lfunc_end0: or # -- End function
45 r'^_?(?P<func>[^:]+):[ \t]*\/\/[ \t]*@"?(?P=func)"?( (Function|Tail Call))?\n'
46 r"(?:[ \t]+.cfi_startproc\n)?" # drop optional cfi noise
47 r"(?P<body>.*?)\n"
49 r"^\s*(\.Lfunc_end[0-9]+|// -- End function)",
54 r"\.type\s+_?(?P<func>[^,\n]+),@function\n"
55 r"(^\s*\.amdgpu_hsa_kernel (?P=func)\n)?"
56 r'^_?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n'
57 r"(?P<body>.*?)\n" # (body of the function)
59 r"^\s*(\.Lfunc_end[0-9]+:\n|\.section)",
64 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
65 r"(?:[ \t]+.cfi_startproc\n|.seh_proc[^\n]+\n)?" # drop optional cfi
66 r"(?P<body>.*?)\s*"
67 r".Lfunc_end[0-9]+:\n",
72 r'^_?(?P<func>[^:]+):[ \t]*//[ \t]*@"?(?P=func)"?\n[^:]*?'
73 r"(?P<body>.*?)\n" # (body of the function)
75 r".Lfunc_end[0-9]+:\n",
80 r'^_?(?P<func>[^:]+):[ \t]*;[ \t]*@"?(?P=func)"?\n'
81 r'(?:\.L(?P=func)\$local:\n)?' # drop .L<func>$local:
82 r'(?:[ \t]+\.type[ \t]+\.L(?P=func)\$local,@function\n)?' # drop .type .L<func>$local,@function
83 r'(?P<body>.*?)\s*' # (body of the function)
84 r'.Lfunc_end[0-9]+:\n',
88 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n[^:]*?' # f: (name of func)
89 r"(?:\s*\.?Ltmp[^:\n]*:\n)?[^:]*?" # optional .Ltmp<N> for EH
90 r"(?:^[ \t]+\.(frame|f?mask|set).*?\n)+" # Mips+LLVM standard asm prologue
91 r"(?P<body>.*?)\n" # (body of the function)
93 r"(?:(^[ \t]+\.set[^\n]*?\n)*^[ \t]+\.end.*?\n)"
94 r"(\$|\.L)func_end[0-9]+:\n", # $func_end0: (mips32 - O32) or
95 # .Lfunc_end0: (mips64 - NewABI)
100 r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@"?(?P=func)"?\n[^:]*?'
101 r"(?P<body>.*?)\n"
102 r"(\$|\.L)func_end[0-9]+:\n", # $func_end0:
107 r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@"?(?P=func)"?\n[^:]*?'
108 r"(?P<body>.*?)\n"
109 r".Lfunc_end[0-9]+:\n",
114 r"#[ \-\t]*Begin function (?P<func>[^.:]+)\n"
115 r".*?"
116 r'^[_.]?(?P=func):(?:[ \t]*#+[ \t]*@"?(?P=func)"?)?\n'
117 r"(?:^[^#]*\n)*"
118 r"(?P<body>.*?)\n"
120 r"(?:^[ \t]*(?:\.(?:long|quad|v?byte)[ \t]+[^\n]+)\n)*"
121 r"(?:\.Lfunc_end|L\.\.(?P=func))[0-9]+:\n",
126 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
127 r"(?:\s*\.?L(?P=func)\$local:\n)?" # optional .L<func>$local: due to -fno-semantic-interposition
128 r"(?:\s*\.type\s+\.?L(?P=func)\$local,@function\n)?" # optional .type .L<func>$local
129 r"(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?"
130 r"(?P<body>^##?[ \t]+[^:]+:.*?)\s*"
131 r".Lfunc_end[0-9]+:\n",
136 r'^_?(?P<func>[^:]+):[ \t]*!+[ \t]*@"?(?P=func)"?\n'
137 r"(?:[ \t]+.cfi_startproc\n)?" # drop optional cfi noise
138 r"(?P<body>.*?)\s*"
139 r".Lfunc_end[0-9]+:\n",
144 r'^_?(?P<func>[^:]+):[ \t]*!+[ \t]*@"?(?P=func)"?\n'
145 r"(?P<body>.*?)\s*"
146 r".Lfunc_end[0-9]+:\n",
151 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
152 r"(?:[ \t]+.cfi_startproc\n)?"
153 r"(?P<body>.*?)\n"
154 r".Lfunc_end[0-9]+:\n",
159 r'^_(?P<func>[^:]+):[ \t]*;[ \t]@"?(?P=func)"?\n'
160 r"([ \t]*.cfi_startproc\n[\s]*)?"
161 r"(?P<body>.*?)"
162 r"([ \t]*.cfi_endproc\n[\s]*)?"
163 r"^[ \t]*;[ \t]--[ \t]End[ \t]function",
168 r"@[ \t]--[ \t]Begin[ \t]function[ \t](?P<func>[^ \t]+?)\n"
169 r"^[ \t]*\.globl[ \t]*_(?P=func)[ \t]*"
170 r"(?P<directives>.*?)"
171 r"^_(?P=func):\n[ \t]*"
172 r"(?P<body>.*?)"
173 r"^[ \t]*@[ \t]--[ \t]End[ \t]function",
178 r"^_(?P<func>[^:]+):[ \t]*\n"
179 r"([ \t]*.cfi_startproc\n[ \t]*)?"
180 r"(?P<body>.*?)\n"
181 r"[ \t]*\.cfi_endproc\n",
186 r"^_(?P<func>[^:]+):\n" r"(?P<body>.*?)\n" r"[ \t]*\.data_region\n",
191 r"^_(?P<func>[^:]+):\n" r"(?P<body>.*?)\n" r"^[ \t]*@[ \t]--[ \t]End[ \t]function",
196 r"^_(?P<func>[^:]+):\n" r"(?P<body>.*?)" r"^[ \t]*@[ \t]--[ \t]End[ \t]function",
201 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
202 r"(?P<body>.*?)\n"
203 r"^\s*(\.Lfunc_end[0-9]+:\n|end_function)",
211 r'OpName (?P<var>%[0-9]+) "(?P<func>[^"]+)(?P<func_name_separator>)".*(?P<body>(?P=var) = OpFunction.+?OpFunctionEnd)',
216 r"^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n"
217 r"(?:\s*\.?L(?P=func)\$local:\n)?" # optional .L<func>$local: due to -fno-semantic-interposition
218 r"(?:\s*\.type\s+\.?L(?P=func)\$local,@function\n)?" # optional .type .L<func>$local
219 r"(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?"
220 r"(?P<body>^##?[ \t]+[^:]+:.*?)\s*"
221 r".Lfunc_end[0-9]+:\n",
226 r"^(?P<func>[^:]+): +# @(?P=func)\n(?P<body>.*?)\n\.Lfunc_end\d+:\n",
231 r"^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?"
232 r"(?P<body>^##?[ \t]+[^:]+:.*?)\s*"
233 r".Lfunc_end[0-9]+:\n",
240 # r'^(\.visible\s+)?\.func\s+(\([^\)]*\)\s*)?'
241 r"^(\.(func|visible|weak|entry|noreturn|extern)\s+)+(\([^\)]*\)\s*)?"
243 r"(?P<func>[^\(\n]+)"
245 r"(?P<func_name_separator>\()"
249 # ) // -- Begin function callee_St8x4
250 r"[^\)]*\)(\s*//[^\n]*)?\n"
252 r"(?P<body>.*?)\n"
254 r"\s*// -- End function",
259 r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
260 r"(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?"
261 r"(?P<body>^##?[ \t]+[^:]+:.*?)\s*"
262 r".Lfunc_end[0-9]+:\n",
267 r"^(\s*\w+) [^#\n]+#+ ((?:[xyz]mm\d+|mem)( \{%k\d+\}( \{z\})?)? = .*)$", flags=re.M
271 r"^(\s*\w+) [^#\n]+#+ ((?:[xyz]mm\d+|mem)( \{%k\d+\}( \{z\})?)? = (?!.*(?:mem)).*)$",
276 r"-?\d+\(%([er])[sb]p\)(.*(?:Spill|Reload))$", flags=re.M
278 SCRUB_X86_SP_RE = re.compile(r"\d+\(%(esp|rsp)\)")
279 SCRUB_X86_RIP_RE = re.compile(r"[.\w]+\(%rip\)")
280 SCRUB_X86_LCP_RE = re.compile(r"\.?LCPI[0-9]+_[0-9]+")
281 SCRUB_X86_RET_RE = re.compile(r"ret[l|q]")
287 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
293 asm = SCRUB_X86_SHUFFLES_NO_MEM_RE.sub(r"\1 {{.*#+}} \2", asm)
295 asm = SCRUB_X86_SHUFFLES_RE.sub(r"\1 {{.*#+}} \2", asm)
299 asm = SCRUB_X86_SPILL_RELOAD_RE.sub(r"{{[-0-9]+}}(%\1{{[sb]}}p)\2", asm)
302 asm = SCRUB_X86_SP_RE.sub(r"{{[0-9]+}}(%\1)", asm)
304 # Generically match a RIP-relative memory operand.
305 asm = SCRUB_X86_RIP_RE.sub(r"{{.*}}(%rip)", asm)
307 asm = SCRUB_X86_LCP_RE.sub(r"{{\.?LCPI[0-9]+_[0-9]+}}", asm)
309 # Avoid generating different checks for 32- and 64-bit because of 'retl' vs 'retq'.
310 asm = SCRUB_X86_RET_RE.sub(r"ret{{[l|q]}}", asm)
314 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
321 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
325 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
332 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
338 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
345 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
349 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
356 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
360 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
367 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
371 asm = common.SCRUB_LOOP_COMMENT_RE.sub(r"#", asm)
373 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
375 asm = common.SCRUB_TAILING_COMMENT_TOKEN_RE.sub(r"", asm)
382 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
386 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
393 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
397 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
404 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
408 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
415 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
419 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
426 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
430 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
437 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
441 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
448 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
452 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
459 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
463 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
470 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
474 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
481 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
485 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
492 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
496 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
503 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
507 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
514 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
520 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
527 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
531 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
538 asm = common.SCRUB_WHITESPACE_RE.sub(r" ", asm)
542 asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r"", asm)
556 "aarch64-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
557 "aarch64-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
568 "arm64-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
569 "arm64-apple-macosx": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
570 "armv7-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_IOS_RE),
571 "armv7-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_DARWIN_RE),
573 "thumb-macho": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE),
574 "thumbv5-macho": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE),
575 "thumbv7s-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_THUMBS_DARWIN_RE),
576 "thumbv7-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_THUMB_DARWIN_RE),
577 "thumbv7-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_IOS_RE),
609 raise KeyError("Triple %r is not supported" % (triple))
628 check_label_format = "{} %s-LABEL: %s%s%s%s".format(comment_marker)