Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / debug_expr_convert.s
blob7f9058c26351c2139e95da6da6d8edbaa61de297
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
2 # RUN: llvm-dwarfdump %t.o | FileCheck %s
3 # RUN: not llvm-dwarfdump -verify %t.o
5 # CHECK: DW_AT_location (DW_OP_addr 0x{{[0-9a-f]+}}, DW_OP_convert <invalid base_type ref: 0x{{[0-9a-f]+}}>, DW_OP_convert (0x{{[0-9a-f]+}}) "DW_ATE_signed_32")
7 .text
8 .file "dbg.g.c"
9 .file 1 "/tmp/dbg.g.c"
10 .type global,@object # @global
11 .data
12 .globl global
13 .p2align 2
14 global:
15 .long 255 # 0xff
16 .size global, 4
18 .section .debug_str,"MS",@progbits,1
19 .Linfo_string0:
20 .asciz "clang version 9.0.0 (trunk 354265) (llvm/trunk 354264)" # string offset=0
21 .Linfo_string1:
22 .asciz "dbg.g.c" # string offset=55
23 .Linfo_string2:
24 .asciz "/tmp" # string offset=63
25 .Linfo_string3:
26 .asciz "global" # string offset=68
27 .Linfo_string4:
28 .asciz "int" # string offset=75
29 .Linfo_string5:
30 .asciz "DW_ATE_signed_32" # string offset=79
31 .Linfo_string6:
32 .asciz "DW_ATE_signed_8" # string offset=96
33 .section .debug_abbrev,"",@progbits
34 .byte 1 # Abbreviation Code
35 .byte 17 # DW_TAG_compile_unit
36 .byte 1 # DW_CHILDREN_yes
37 .byte 37 # DW_AT_producer
38 .byte 14 # DW_FORM_strp
39 .byte 19 # DW_AT_language
40 .byte 5 # DW_FORM_data2
41 .byte 3 # DW_AT_name
42 .byte 14 # DW_FORM_strp
43 .byte 16 # DW_AT_stmt_list
44 .byte 23 # DW_FORM_sec_offset
45 .byte 27 # DW_AT_comp_dir
46 .byte 14 # DW_FORM_strp
47 .byte 0 # EOM(1)
48 .byte 0 # EOM(2)
49 .byte 2 # Abbreviation Code
50 .byte 36 # DW_TAG_base_type
51 .byte 0 # DW_CHILDREN_no
52 .byte 3 # DW_AT_name
53 .byte 14 # DW_FORM_strp
54 .byte 62 # DW_AT_encoding
55 .byte 11 # DW_FORM_data1
56 .byte 11 # DW_AT_byte_size
57 .byte 11 # DW_FORM_data1
58 .byte 0 # EOM(1)
59 .byte 0 # EOM(2)
60 .byte 3 # Abbreviation Code
61 .byte 52 # DW_TAG_variable
62 .byte 0 # DW_CHILDREN_no
63 .byte 3 # DW_AT_name
64 .byte 14 # DW_FORM_strp
65 .byte 73 # DW_AT_type
66 .byte 19 # DW_FORM_ref4
67 .byte 63 # DW_AT_external
68 .byte 25 # DW_FORM_flag_present
69 .byte 58 # DW_AT_decl_file
70 .byte 11 # DW_FORM_data1
71 .byte 59 # DW_AT_decl_line
72 .byte 11 # DW_FORM_data1
73 .byte 2 # DW_AT_location
74 .byte 24 # DW_FORM_exprloc
75 .byte 0 # EOM(1)
76 .byte 0 # EOM(2)
77 .byte 0 # EOM(3)
78 .section .debug_info,"",@progbits
79 .Lcu_begin0:
80 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
81 .Ldebug_info_start0:
82 .short 4 # DWARF version number
83 .long .debug_abbrev # Offset Into Abbrev. Section
84 .byte 8 # Address Size (in bytes)
85 .byte 1 # Abbrev [1] 0xb:0x48 DW_TAG_compile_unit
86 .long .Linfo_string0 # DW_AT_producer
87 .short 12 # DW_AT_language
88 .long .Linfo_string1 # DW_AT_name
89 .long .Lline_table_start0 # DW_AT_stmt_list
90 .long .Linfo_string2 # DW_AT_comp_dir
91 .byte 2 # Abbrev [2] 0x1e:0x7 DW_TAG_base_type
92 .long .Linfo_string6 # DW_AT_name
93 .byte 5 # DW_AT_encoding
94 .byte 1 # DW_AT_byte_size
95 .byte 2 # Abbrev [2] 0x25:0x7 DW_TAG_base_type
96 .long .Linfo_string5 # DW_AT_name
97 .byte 5 # DW_AT_encoding
98 .byte 4 # DW_AT_byte_size
99 .byte 3 # Abbrev [3] 0x2c:0x1f DW_TAG_variable
100 .long .Linfo_string3 # DW_AT_name
101 .long 75 # DW_AT_type
102 # DW_AT_external
103 .byte 1 # DW_AT_decl_file
104 .byte 1 # DW_AT_decl_line
105 .byte 19 # DW_AT_location
106 .byte 3
107 .quad global
108 .byte 168
109 .asciz "\235\200\200" ### This offset is off by one to test the invalid base_type ref printout
110 .byte 168
111 .asciz "\245\200\200"
112 .byte 2 # Abbrev [2] 0x4b:0x7 DW_TAG_base_type
113 .long .Linfo_string4 # DW_AT_name
114 .byte 5 # DW_AT_encoding
115 .byte 4 # DW_AT_byte_size
116 .byte 0 # End Of Children Mark
117 .Ldebug_info_end0:
118 .section .debug_macinfo,"",@progbits
119 .byte 0 # End Of Macro List Mark
121 .ident "clang version 9.0.0 (trunk 354265) (llvm/trunk 354264)"
122 .section ".note.GNU-stack","",@progbits
123 .section .debug_line,"",@progbits
124 .Lline_table_start0: