[OpenACC] Implement 'collapse' for combined constructs.
[llvm-project.git] / llvm / test / tools / llvm-ml / strings.asm
blob26f402c238519e2973ee7c44158bc5acc51576e5
1 ; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
3 .data
5 dq_single_character BYTE "a"
6 ; CHECK-LABEL: dq_single_character:
7 ; CHECK-NEXT: .byte 97
8 ; CHECK-NOT: .byte
10 dq_join BYTE "ab", "cd"
11 ; CHECK-LABEL: dq_join:
12 ; CHECK-NEXT: .byte 97
13 ; CHECK-NEXT: .byte 98
14 ; CHECK-NEXT: .byte 99
15 ; CHECK-NEXT: .byte 100
16 ; CHECK-NOT: .byte
18 dq_quote_escape BYTE "ab""""cd"
19 ; Intended result: ab""cd
20 ; CHECK-LABEL: dq_quote_escape:
21 ; CHECK-NEXT: .byte 97
22 ; CHECK-NEXT: .byte 98
23 ; CHECK-NEXT: .byte 34
24 ; CHECK-NEXT: .byte 34
25 ; CHECK-NEXT: .byte 99
26 ; CHECK-NEXT: .byte 100
27 ; CHECK-NOT: .byte
29 dq_single_quote BYTE "ab''''cd"
30 ; Intended result: ab''''cd
31 ; CHECK-LABEL: dq_single_quote:
32 ; CHECK-NEXT: .byte 97
33 ; CHECK-NEXT: .byte 98
34 ; CHECK-NEXT: .byte 39
35 ; CHECK-NEXT: .byte 39
36 ; CHECK-NEXT: .byte 39
37 ; CHECK-NEXT: .byte 39
38 ; CHECK-NEXT: .byte 99
39 ; CHECK-NEXT: .byte 100
40 ; CHECK-NOT: .byte
42 sq_single_character BYTE 'a'
43 ; CHECK-LABEL: sq_single_character:
44 ; CHECK-NEXT: .byte 97
45 ; CHECK-NOT: .byte
47 sq_join BYTE 'ab', 'cd'
48 ; CHECK-LABEL: sq_join:
49 ; CHECK-NEXT: .byte 97
50 ; CHECK-NEXT: .byte 98
51 ; CHECK-NEXT: .byte 99
52 ; CHECK-NEXT: .byte 100
53 ; CHECK-NOT: .byte
55 sq_quote_escape BYTE 'ab''''cd'
56 ; Intended result: ab''cd
57 ; CHECK-LABEL: sq_quote_escape:
58 ; CHECK-NEXT: .byte 97
59 ; CHECK-NEXT: .byte 98
60 ; CHECK-NEXT: .byte 39
61 ; CHECK-NEXT: .byte 39
62 ; CHECK-NEXT: .byte 99
63 ; CHECK-NEXT: .byte 100
64 ; CHECK-NOT: .byte
66 sq_double_quote BYTE 'ab""""cd'
67 ; Intended result: ab""""cd
68 ; CHECK-LABEL: sq_double_quote:
69 ; CHECK-NEXT: .byte 97
70 ; CHECK-NEXT: .byte 98
71 ; CHECK-NEXT: .byte 34
72 ; CHECK-NEXT: .byte 34
73 ; CHECK-NEXT: .byte 34
74 ; CHECK-NEXT: .byte 34
75 ; CHECK-NEXT: .byte 99
76 ; CHECK-NEXT: .byte 100
77 ; CHECK-NOT: .byte
79 mixed_quotes_join BYTE "a'b", 'c"d'
80 ; Intended result: a'bc"d
81 ; CHECK-LABEL: mixed_quotes_join:
82 ; CHECK-NEXT: .byte 97
83 ; CHECK-NEXT: .byte 39
84 ; CHECK-NEXT: .byte 98
85 ; CHECK-NEXT: .byte 99
86 ; CHECK-NEXT: .byte 34
87 ; CHECK-NEXT: .byte 100
88 ; CHECK-NOT: .byte
90 .code
92 sq_char_test PROC
93 ; CHECK-LABEL: sq_char_test:
95 mov eax, 'a'
96 ; CHECK: mov eax, 97
98 mov eax, ''''
99 ; CHECK: mov eax, 39
101 mov eax, '"'
102 ; CHECK: mov eax, 34
105 sq_char_test ENDP
107 dq_char_test PROC
108 ; CHECK-LABEL: dq_char_test:
110 mov eax, "b"
111 ; CHECK: mov eax, 98
113 mov eax, """"
114 ; CHECK: mov eax, 34
116 mov eax, "'"
117 ; CHECK: mov eax, 39
120 dq_char_test ENDP
122 string_constant_test PROC
123 ; CHECK-LABEL: string_constant_test:
125 mov eax, 'ab'
126 mov eax, "ab"
127 ; CHECK: mov eax, 24930
128 ; CHECK: mov eax, 24930
130 mov eax, "abc"
131 mov eax, 'abc'
132 ; CHECK: mov eax, 6382179
133 ; CHECK: mov eax, 6382179
135 mov eax, "abc"""
136 mov eax, 'abc'''
137 ; CHECK: mov eax, 1633837858
138 ; CHECK: mov eax, 1633837863
141 string_constant_test ENDP