mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[UpdateTestChecks] Allow $ in function names
Some compilers generation functions with '$' in their names, so recognize those functions. This also requires recognizing function names inside quotes in some contexts in order to escape certain characters. Differential Revision: https://reviews.llvm.org/D82995
This commit is contained in:
parent
05cd8277f1
commit
eb1409d08e
@ -0,0 +1,9 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=aarch64-unknown-linux < %s | FileCheck --check-prefix=LINUX %s
|
||||
; RUN: llc -mtriple=aarch64-apple-darwin < %s | FileCheck --check-prefix=DARWIN %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=aarch64-unknown-linux < %s | FileCheck --check-prefix=LINUX %s
|
||||
; RUN: llc -mtriple=aarch64-apple-darwin < %s | FileCheck --check-prefix=DARWIN %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; LINUX-LABEL: _Z54bar$ompvariant$bar:
|
||||
; LINUX: // %bb.0: // %entry
|
||||
; LINUX-NEXT: mov w0, #2
|
||||
; LINUX-NEXT: ret
|
||||
;
|
||||
; DARWIN-LABEL: _Z54bar$ompvariant$bar:
|
||||
; DARWIN: ; %bb.0: ; %entry
|
||||
; DARWIN-NEXT: mov w0, #2
|
||||
; DARWIN-NEXT: ret
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: ; %bb.0: ; %entry
|
||||
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
||||
; CHECK-NEXT: v_mov_b32_e32 v0, 2
|
||||
; CHECK-NEXT: s_setpc_b64 s[30:31]
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=arm64-unknown-linux < %s | FileCheck --prefi=LINUX %s
|
||||
; RUN: llc -mtriple=armv7-apple-darwin < %s | FileCheck --prefix=DARWIN %s
|
||||
; RUN: llc -mtriple=armv7-apple-ios < %s | FileCheck --prefix=IOS %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=arm64-unknown-linux < %s | FileCheck --prefi=LINUX %s
|
||||
; RUN: llc -mtriple=armv7-apple-darwin < %s | FileCheck --prefix=DARWIN %s
|
||||
; RUN: llc -mtriple=armv7-apple-ios < %s | FileCheck --prefix=IOS %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: // %bb.0: // %entry
|
||||
; CHECK-NEXT: mov w0, #2
|
||||
; CHECK-NEXT: ret
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=hexagon-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=hexagon-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: .cfi_startproc
|
||||
; CHECK-NEXT: // %bb.0: // %entry
|
||||
; CHECK-NEXT: {
|
||||
; CHECK-NEXT: r0 = #2
|
||||
; CHECK-NEXT: jumpr r31
|
||||
; CHECK-NEXT: }
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=lanai-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=lanai-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: ! %bb.0: ! %entry
|
||||
; CHECK-NEXT: st %fp, [--%sp]
|
||||
; CHECK-NEXT: add %sp, 0x8, %fp
|
||||
; CHECK-NEXT: sub %sp, 0x8, %sp
|
||||
; CHECK-NEXT: mov 0x2, %rv
|
||||
; CHECK-NEXT: ld -4[%fp], %pc ! return
|
||||
; CHECK-NEXT: add %fp, 0x0, %sp
|
||||
; CHECK-NEXT: ld -8[%fp], %fp
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=mips-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=mips-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: jr $ra
|
||||
; CHECK-NEXT: addiu $2, $zero, 2
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=msp430-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=msp430-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: ; %bb.0: ; %entry
|
||||
; CHECK-NEXT: mov #2, r12
|
||||
; CHECK-NEXT: clr r13
|
||||
; CHECK-NEXT: ret
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=ppc32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=ppc32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: li 3, 2
|
||||
; CHECK-NEXT: blr
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=riscv32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=riscv32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: addi a0, zero, 2
|
||||
; CHECK-NEXT: ret
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=sparc-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=sparc-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: .cfi_startproc
|
||||
; CHECK-NEXT: ! %bb.0: ! %entry
|
||||
; CHECK-NEXT: retl
|
||||
; CHECK-NEXT: mov 2, %o0
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=s390x-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=s390x-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: lhi %r2, 2
|
||||
; CHECK-NEXT: br %r14
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=wasm32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=wasm32-unknown-linux < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: .functype _Z54bar$ompvariant$bar () -> (i32)
|
||||
; CHECK-NEXT: # %bb.0: # %entry
|
||||
; CHECK-NEXT: i32.const 2
|
||||
; CHECK-NEXT: # fallthrough-return
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
; CHECK-LABEL: _Z54bar$ompvariant$bar:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: movl $2, %eax
|
||||
; CHECK-NEXT: retq
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: aarch64-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/aarch64_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/aarch64_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: amdgpu-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/amdgpu_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/amdgpu_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: arm-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/arm_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/arm_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: hexagon-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/hexagon_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/hexagon_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: lanai-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/lanai_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/lanai_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: mips-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/mips_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/mips_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: msp430-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/msp430_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/msp430_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: powerpc-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/ppc_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/ppc_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: riscv-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/riscv_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/riscv_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: sparc-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/sparc_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/sparc_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: systemz-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/systemz_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/systemz_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: webassembly-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/wasm_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/wasm_function_name.ll.expected %t.ll
|
@ -0,0 +1,5 @@
|
||||
# REQUIRES: x86-registered-target
|
||||
## Check that functions names with '$' are processed correctly
|
||||
|
||||
# RUN: cp -f %S/Inputs/x86_function_name.ll %t.ll && %update_llc_test_checks %t.ll
|
||||
# RUN: diff -u %S/Inputs/x86_function_name.ll.expected %t.ll
|
@ -0,0 +1,8 @@
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; Check that we accept functions with '$' in the name.
|
||||
;
|
||||
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
||||
;
|
||||
define hidden i32 @"_Z54bar$ompvariant$bar"() {
|
||||
entry:
|
||||
ret i32 2
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
# REQUIRES: x86-registered-target
|
||||
## Basic test checking that update_test_checks.py works correctly
|
||||
# RUN: cp -f %S/Inputs/function_name.ll %t.ll && %update_test_checks %t.ll
|
||||
# RUN: diff -u %t.ll %S/Inputs/function_name.ll.expected
|
||||
## Check that running the script again does not change the result:
|
||||
# RUN: %update_test_checks %t.ll
|
||||
# RUN: diff -u %t.ll %S/Inputs/function_name.ll.expected
|
@ -15,7 +15,7 @@ else:
|
||||
##### Assembly parser
|
||||
|
||||
ASM_FUNCTION_X86_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?'
|
||||
r'(?P<body>^##?[ \t]+[^:]+:.*?)\s*'
|
||||
r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|#+ -- End function)',
|
||||
flags=(re.M | re.S))
|
||||
@ -28,7 +28,7 @@ ASM_FUNCTION_ARM_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_AARCH64_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*\/\/[ \t]*@(?P=func)\n'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*\/\/[ \t]*@"?(?P=func)"?\n'
|
||||
r'(?:[ \t]+.cfi_startproc\n)?' # drop optional cfi noise
|
||||
r'(?P<body>.*?)\n'
|
||||
# This list is incomplete
|
||||
@ -36,21 +36,21 @@ ASM_FUNCTION_AARCH64_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_AMDGPU_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@(?P=func)\n[^:]*?'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@"?(?P=func)"?\n[^:]*?'
|
||||
r'(?P<body>.*?)\n' # (body of the function)
|
||||
# This list is incomplete
|
||||
r'^\s*(\.Lfunc_end[0-9]+:\n|\.section)',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_HEXAGON_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*//[ \t]*@(?P=func)\n[^:]*?'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*//[ \t]*@"?(?P=func)"?\n[^:]*?'
|
||||
r'(?P<body>.*?)\n' # (body of the function)
|
||||
# This list is incomplete
|
||||
r'.Lfunc_end[0-9]+:\n',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_MIPS_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?' # f: (name of func)
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n[^:]*?' # f: (name of func)
|
||||
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
|
||||
@ -60,13 +60,13 @@ ASM_FUNCTION_MIPS_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_MSP430_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@(?P=func)\n[^:]*?'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@"?(?P=func)"?\n[^:]*?'
|
||||
r'(?P<body>.*?)\n'
|
||||
r'(\$|\.L)func_end[0-9]+:\n', # $func_end0:
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_PPC_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
|
||||
r'.*?'
|
||||
r'\.Lfunc_begin[0-9]+:\n'
|
||||
r'(?:[ \t]+.cfi_startproc\n)?'
|
||||
@ -78,7 +78,7 @@ ASM_FUNCTION_PPC_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_RISCV_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
|
||||
r'(?:\s*\.?L(?P=func)\$local:\n)?' # optional .L<func>$local: due to -fno-semantic-interposition
|
||||
r'(?:\s*\.?Lfunc_begin[^:\n]*:\n)?[^:]*?'
|
||||
r'(?P<body>^##?[ \t]+[^:]+:.*?)\s*'
|
||||
@ -86,27 +86,27 @@ ASM_FUNCTION_RISCV_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_LANAI_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*!+[ \t]*@(?P=func)\n'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*!+[ \t]*@"?(?P=func)"?\n'
|
||||
r'(?:[ \t]+.cfi_startproc\n)?' # drop optional cfi noise
|
||||
r'(?P<body>.*?)\s*'
|
||||
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<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'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
|
||||
r'[ \t]+.cfi_startproc\n'
|
||||
r'(?P<body>.*?)\n'
|
||||
r'.Lfunc_end[0-9]+:\n',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_AARCH64_DARWIN_RE = re.compile(
|
||||
r'^_(?P<func>[^:]+):[ \t]*;[ \t]@(?P=func)\n'
|
||||
r'^_(?P<func>[^:]+):[ \t]*;[ \t]@"?(?P=func)"?\n'
|
||||
r'([ \t]*.cfi_startproc\n[\s]*)?'
|
||||
r'(?P<body>.*?)'
|
||||
r'([ \t]*.cfi_endproc\n[\s]*)?'
|
||||
@ -114,7 +114,7 @@ ASM_FUNCTION_AARCH64_DARWIN_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_ARM_DARWIN_RE = re.compile(
|
||||
r'^[ \t]*\.globl[ \t]*_(?P<func>[^ \t])[ \t]*@[ \t]--[ \t]Begin[ \t]function[ \t](?P=func)'
|
||||
r'^[ \t]*\.globl[ \t]*_(?P<func>[^ \t])[ \t]*@[ \t]--[ \t]Begin[ \t]function[ \t]"?(?P=func)"?'
|
||||
r'(?P<directives>.*?)'
|
||||
r'^_(?P=func):\n[ \t]*'
|
||||
r'(?P<body>.*?)'
|
||||
@ -137,7 +137,7 @@ ASM_FUNCTION_ARM_IOS_RE = re.compile(
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ASM_FUNCTION_WASM32_RE = re.compile(
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n'
|
||||
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
|
||||
r'(?P<body>.*?)\n'
|
||||
r'^\s*(\.Lfunc_end[0-9]+:\n|end_function)',
|
||||
flags=(re.M | re.S))
|
||||
|
@ -145,16 +145,16 @@ UTC_ARGS_CMD = re.compile(r'.*' + UTC_ARGS_KEY + '\s*(?P<cmd>.*)\s*$')
|
||||
UTC_ADVERT = 'NOTE: Assertions have been autogenerated by '
|
||||
|
||||
OPT_FUNCTION_RE = re.compile(
|
||||
r'^(\s*;\s*Function\sAttrs:\s(?P<attrs>[\w\s]+?))?\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w.-]+?)\s*'
|
||||
r'^(\s*;\s*Function\sAttrs:\s(?P<attrs>[\w\s]+?))?\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w.$-]+?)\s*'
|
||||
r'(?P<args_and_sig>\((\)|(.*?[\w.-]+?)\))[^{]*\{)\n(?P<body>.*?)^\}$',
|
||||
flags=(re.M | re.S))
|
||||
|
||||
ANALYZE_FUNCTION_RE = re.compile(
|
||||
r'^\s*\'(?P<analysis>[\w\s-]+?)\'\s+for\s+function\s+\'(?P<func>[\w.-]+?)\':'
|
||||
r'^\s*\'(?P<analysis>[\w\s-]+?)\'\s+for\s+function\s+\'(?P<func>[\w.$-]+?)\':'
|
||||
r'\s*\n(?P<body>.*)$',
|
||||
flags=(re.X | re.S))
|
||||
|
||||
IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@([\w.-]+)\s*\(')
|
||||
IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@"?([\w.$-]+)"?\s*\(')
|
||||
TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$')
|
||||
TRIPLE_ARG_RE = re.compile(r'-mtriple[= ]([^ ]+)')
|
||||
MARCH_ARG_RE = re.compile(r'-march[= ]([^ ]+)')
|
||||
|
Loading…
Reference in New Issue
Block a user