diff options
author | Qiu Chaofan <qiucofan@cn.ibm.com> | 2021-01-05 10:21:31 +0800 |
---|---|---|
committer | Qiu Chaofan <qiucofan@cn.ibm.com> | 2021-01-05 10:28:00 +0800 |
commit | ae614851631387f86cb7ab1f33a4851a6549c279 (patch) | |
tree | 4955283cb98795475819bb4e238829b8686a3fb0 /llvm/utils/UpdateTestChecks/asm.py | |
parent | f665a8c5b8b42d88f89e1a3594b7d410ef206c32 (diff) | |
download | llvm-ae614851631387f86cb7ab1f33a4851a6549c279.zip llvm-ae614851631387f86cb7ab1f33a4851a6549c279.tar.gz llvm-ae614851631387f86cb7ab1f33a4851a6549c279.tar.bz2 |
[UpdateTestChecks] Fix PowerPC RE to support AIX assembly
Current update_llc_test_checks.py cannot generate checks for AIX
(powerpc64-ibm-aix-xcoff) properly. Assembly generated is little bit
different from Linux. So I use begin function comment here to capture
function name.
Reviewed By: MaskRay, steven.zhang
Differential Revision: https://reviews.llvm.org/D93676
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/asm.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index a42a75e..407b26c 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -68,15 +68,14 @@ ASM_FUNCTION_MSP430_RE = re.compile( flags=(re.M | re.S)) ASM_FUNCTION_PPC_RE = re.compile( - r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n' + r'#[ \-\t]*Begin function (?P<func>[^.:]+)\n' r'.*?' - r'\.Lfunc_begin[0-9]+:\n' - r'(?:[ \t]+.cfi_startproc\n)?' - r'(?:\.Lfunc_[gl]ep[0-9]+:\n(?:[ \t]+.*?\n)*)*' + r'^[_.]?(?P=func):(?:[ \t]*#+[ \t]*@"?(?P=func)"?)?\n' + r'(?:^[^#]*\n)*' r'(?P<body>.*?)\n' # This list is incomplete - r'(?:^[ \t]*(?:\.long[ \t]+[^\n]+|\.quad[ \t]+[^\n]+)\n)*' - r'.Lfunc_end[0-9]+:\n', + r'(?:^[ \t]*(?:\.(?:long|quad|v?byte)[ \t]+[^\n]+)\n)*' + r'(?:\.Lfunc_end|L\.\.(?P=func))[0-9]+:\n', flags=(re.M | re.S)) ASM_FUNCTION_RISCV_RE = re.compile( |