mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 13:21:30 +00:00
Add SPARC support to update_llc_test_checks.py
Reviewers: spatel, jyknight Reviewed By: spatel Subscribers: fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D45809 llvm-svn: 330401
This commit is contained in:
parent
9a465a9cac
commit
7415ad946f
@ -60,6 +60,12 @@ ASM_FUNCTION_RISCV_RE = re.compile(
|
||||
r'.Lfunc_end[0-9]+:\n',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_SPARC_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*!+[ \t]*@(?P=func)\n'
|
||||
r'(?P<body>.*?)\s*'
|
||||
r'.Lfunc_end[0-9]+:\n',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_SYSTEMZ_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n'
|
||||
r'[ \t]+.cfi_startproc\n'
|
||||
@ -154,6 +160,16 @@ def scrub_asm_riscv(asm, args):
|
||||
asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
|
||||
return asm
|
||||
|
||||
def scrub_asm_sparc(asm, args):
|
||||
# Scrub runs of whitespace out of the assembly, but leave the leading
|
||||
# whitespace in place.
|
||||
asm = common.SCRUB_WHITESPACE_RE.sub(r' ', asm)
|
||||
# Expand the tabs used for indentation.
|
||||
asm = string.expandtabs(asm, 2)
|
||||
# Strip trailing whitespace.
|
||||
asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
|
||||
return asm
|
||||
|
||||
def scrub_asm_systemz(asm, args):
|
||||
# Scrub runs of whitespace out of the assembly, but leave the leading
|
||||
# whitespace in place.
|
||||
@ -198,6 +214,8 @@ def build_function_body_dictionary_for_triple(args, raw_tool_output, triple, pre
|
||||
'powerpc64le': (scrub_asm_powerpc64, ASM_FUNCTION_PPC_RE),
|
||||
'riscv32': (scrub_asm_riscv, ASM_FUNCTION_RISCV_RE),
|
||||
'riscv64': (scrub_asm_riscv, ASM_FUNCTION_RISCV_RE),
|
||||
'sparc': (scrub_asm_sparc, ASM_FUNCTION_SPARC_RE),
|
||||
'sparcv9': (scrub_asm_sparc, ASM_FUNCTION_SPARC_RE),
|
||||
's390x': (scrub_asm_systemz, ASM_FUNCTION_SYSTEMZ_RE),
|
||||
}
|
||||
handlers = None
|
||||
|
Loading…
Reference in New Issue
Block a user