aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/asm.py
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2021-09-28 15:10:07 +0100
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2021-09-28 17:57:36 +0100
commit547e5e4ae613cf5ae3727abef84d5ac0334d9987 (patch)
tree7b6f0384f35bb19c0e464273e0e1dbfc479b6a4a /llvm/utils/UpdateTestChecks/asm.py
parentee3109b044a2bb727b91df53f99483cfe7593a72 (diff)
downloadllvm-547e5e4ae613cf5ae3727abef84d5ac0334d9987.zip
llvm-547e5e4ae613cf5ae3727abef84d5ac0334d9987.tar.gz
llvm-547e5e4ae613cf5ae3727abef84d5ac0334d9987.tar.bz2
[update_llc_test_checks.py] Fix MIPS ASM regex for functions with EH
On MIPS, functions with exception handling code emits an additional temporary label at the start of the function (due to UseAssignmentForEHBegin): _Z8do_catchv: # @_Z8do_catchv .Ltmp3: .set .Lfunc_begin0, .Ltmp3 .cfi_startproc .cfi_personality 128, DW.ref.__gxx_personality_v0 .cfi_lsda 0, .Lexception0 .frame $c11,48,$c17 .mask 0x00000000,0 .fmask 0x00000000,0 .set noreorder .set nomacro .set noat # %bb.0: # %entry The `[^:]*` regex was terminating the search after .Ltmp<N>: and therefore not detecting functions with exception handling. Reviewed By: atanasyan, MaskRay Differential Revision: https://reviews.llvm.org/D100027
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r--llvm/utils/UpdateTestChecks/asm.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 2a18899..a877fea 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -59,6 +59,7 @@ ASM_FUNCTION_M68K_RE = re.compile(
ASM_FUNCTION_MIPS_RE = re.compile(
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n[^:]*?' # f: (name of func)
+ r'(?:\s*\.?Ltmp[^:\n]*:\n)?[^:]*?' # optional .Ltmp<N> for EH
r'(?:^[ \t]+\.(frame|f?mask|set).*?\n)+' # Mips+LLVM standard asm prologue
r'(?P<body>.*?)\n' # (body of the function)
# Mips+LLVM standard asm epilogue