xref: /llvm-project/clang/test/CodeGen/SystemZ/systemz-ppa2.c (revision 5fb2797f23343999cace3afe24480e8711df4566)
1 // Please note the following:
2 //   + we are checking that the first bytes of the PPA2 are 0x3 0x0
3 //     for C, and 0x3 0x1 for C++
4 //   + the label for the PPA2 seems to vary on different versions.
5 //     We try to cover all cases, and use substitution blocks to
6 //     help write the tests. The contents of the PPA2 itself should
7 //     not be different.
8 //   + the [[:space:]] combines the two .byte lines into one pattern.
9 //     This is necessary because if the lines were separated, the first
10 //     .byte (i.e., the one for the 3) would, it seems, also match
11 //     the .byte line below for the 34.
12 
13 // REQUIRES: systemz-registered-target
14 
15 // RUN: %clang_cc1 -triple s390x-ibm-zos -xc -S -o - %s | FileCheck %s --check-prefix CHECK-C
16 // CHECK-C:        [[PPA2:(.L)|(L#)PPA2]]:
17 // CHECK-C-NEXT:   .byte        3{{[[:space:]]*}}.byte 0
18 // CHECK-C-NEXT:   .byte        34{{$}}
19 // CHECK-C-NEXT:   .byte        {{4}}
20 // CHECK-C-NEXT:   .long        {{(CELQSTRT)}}-[[PPA2]]
21 
22 // RUN: %clang_cc1 -triple s390x-ibm-zos -xc++ -S -o - %s | FileCheck %s --check-prefix CHECK-CXX
23 // CHECK-CXX:        [[PPA2:(.L)|(L#)PPA2]]:
24 // CHECK-CXX-NEXT:   .byte      3{{[[:space:]]*}}.byte 1
25 // CHECK-CXX-NEXT:   .byte      34{{$}}
26 // CHECK-CXX-NEXT:   .byte      {{4}}
27 // CHECK-CXX-NEXT:   .long      {{(CELQSTRT)}}-[[PPA2]]
28