llvm.org GIT mirror llvm / 71f3f11
Fix DWARF description of Q registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129952 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 9 years ago
2 changed file(s) with 121 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
208208 EmitULEB128(32);
209209 EmitULEB128(0);
210210 }
211 } else if (Reg >= ARM::Q0 && Reg <= ARM::Q15) {
212 // Q registers Q0-Q15 are described by composing two D registers together.
213 // Qx = DW_OP_regx(256+2x) DW_OP_piece(8) DW_OP_regx(256+2x+1) DW_OP_piece(8)
214
215 unsigned QReg = Reg - ARM::Q0;
216 unsigned D1 = 256 + 2 * QReg;
217 unsigned D2 = D1 + 1;
218
219 OutStreamer.AddComment("Loc expr size");
220 // DW_OP_regx + ULEB + DW_OP_piece + ULEB(8) +
221 // DW_OP_regx + ULEB + DW_OP_piece + ULEB(8);
222 // 6 + ULEB(D1) + ULEB(D2)
223 EmitInt16(6 + MCAsmInfo::getULEB128Size(D1) + MCAsmInfo::getULEB128Size(D2));
224
225 OutStreamer.AddComment("DW_OP_regx for Q register: D1");
226 EmitInt8(dwarf::DW_OP_regx);
227 EmitULEB128(D1);
228 OutStreamer.AddComment("DW_OP_piece 8");
229 EmitInt8(dwarf::DW_OP_piece);
230 EmitULEB128(8);
231
232 OutStreamer.AddComment("DW_OP_regx for Q register: D2");
233 EmitInt8(dwarf::DW_OP_regx);
234 EmitULEB128(D2);
235 OutStreamer.AddComment("DW_OP_piece 8");
236 EmitInt8(dwarf::DW_OP_piece);
237 EmitULEB128(8);
211238 }
212239 }
213240 }
0 ; RUN: llc < %s - | FileCheck %s
1 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
2 target triple = "thumbv7-apple-macosx10.6.7"
3
4 ;CHECK: DW_OP_regx for Q register: D1
5 ;CHECK-NEXT: byte
6 ;CHECK-NEXT: byte
7 ;CHECK-NEXT: DW_OP_piece 8
8 ;CHECK-NEXT: byte 8
9 ;CHECK-NEXT: DW_OP_regx for Q register: D2
10 ;CHECK-NEXT: byte
11 ;CHECK-NEXT: byte
12 ;CHECK-NEXT: DW_OP_piece 8
13 ;CHECK-NEXT: byte 8
14
15 @.str = external constant [13 x i8]
16
17 declare <4 x float> @test0001(float) nounwind readnone ssp
18
19 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp {
20 entry:
21 br label %for.body9
22
23 for.body9: ; preds = %for.body9, %entry
24 %add19 = fadd <4 x float> undef, , !dbg !39
25 br i1 undef, label %for.end54, label %for.body9, !dbg !44
26
27 for.end54: ; preds = %for.body9
28 tail call void @llvm.dbg.value(metadata !{<4 x float> %add19}, i64 0, metadata !27), !dbg !39
29 %tmp115 = extractelement <4 x float> %add19, i32 1
30 %conv6.i75 = fpext float %tmp115 to double, !dbg !45
31 %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
32 ret i32 0, !dbg !49
33 }
34
35 declare i32 @printf(i8* nocapture, ...) nounwind
36
37 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
38
39 !llvm.dbg.sp = !{!0, !10, !14}
40 !llvm.dbg.lv.test0001 = !{!18}
41 !llvm.dbg.lv.main = !{!19, !20, !24, !26, !27, !28, !29}
42 !llvm.dbg.lv.printFV = !{!30}
43
44 !0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"test0001", metadata !"test0001", metadata !"", metadata !1, i32 3, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, <4 x float> (float)* @test0001, null} ; [ DW_TAG_subprogram ]
45 !1 = metadata !{i32 589865, metadata !"build2.c", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
46 !2 = metadata !{i32 589841, i32 0, i32 12, metadata !"build2.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 129915)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
47 !3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
48 !4 = metadata !{metadata !5}
49 !5 = metadata !{i32 589846, metadata !2, metadata !"v4f32", metadata !1, i32 14, i64 0, i64 0, i64 0, i32 0, metadata !6} ; [ DW_TAG_typedef ]
50 !6 = metadata !{i32 590083, metadata !2, metadata !"", metadata !2, i32 0, i64 128, i64 128, i32 0, i32 0, metadata !7, metadata !8, i32 0, i32 0} ; [ DW_TAG_vector_type ]
51 !7 = metadata !{i32 589860, metadata !2, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
52 !8 = metadata !{metadata !9}
53 !9 = metadata !{i32 589857, i64 0, i64 3} ; [ DW_TAG_subrange_type ]
54 !10 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"", metadata !1, i32 59, metadata !11, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i8**)* @main, null} ; [ DW_TAG_subprogram ]
55 !11 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !12, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
56 !12 = metadata !{metadata !13}
57 !13 = metadata !{i32 589860, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
58 !14 = metadata !{i32 589870, i32 0, metadata !15, metadata !"printFV", metadata !"printFV", metadata !"", metadata !15, i32 41, metadata !16, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, null, null} ; [ DW_TAG_subprogram ]
59 !15 = metadata !{i32 589865, metadata !"/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/UnitTests/Vector/helpers.h", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
60 !16 = metadata !{i32 589845, metadata !15, metadata !"", metadata !15, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !17, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
61 !17 = metadata !{null}
62 !18 = metadata !{i32 590081, metadata !0, metadata !"a", metadata !1, i32 16777219, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
63 !19 = metadata !{i32 590081, metadata !10, metadata !"argc", metadata !1, i32 16777275, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
64 !20 = metadata !{i32 590081, metadata !10, metadata !"argv", metadata !1, i32 33554491, metadata !21, i32 0} ; [ DW_TAG_arg_variable ]
65 !21 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !22} ; [ DW_TAG_pointer_type ]
66 !22 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !23} ; [ DW_TAG_pointer_type ]
67 !23 = metadata !{i32 589860, metadata !2, metadata !"char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
68 !24 = metadata !{i32 590080, metadata !25, metadata !"i", metadata !1, i32 60, metadata !13, i32 0} ; [ DW_TAG_auto_variable ]
69 !25 = metadata !{i32 589835, metadata !10, i32 59, i32 33, metadata !1, i32 14} ; [ DW_TAG_lexical_block ]
70 !26 = metadata !{i32 590080, metadata !25, metadata !"j", metadata !1, i32 60, metadata !13, i32 0} ; [ DW_TAG_auto_variable ]
71 !27 = metadata !{i32 590080, metadata !25, metadata !"x", metadata !1, i32 61, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
72 !28 = metadata !{i32 590080, metadata !25, metadata !"y", metadata !1, i32 62, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
73 !29 = metadata !{i32 590080, metadata !25, metadata !"z", metadata !1, i32 63, metadata !5, i32 0} ; [ DW_TAG_auto_variable ]
74 !30 = metadata !{i32 590081, metadata !14, metadata !"F", metadata !15, i32 16777257, metadata !31, i32 0} ; [ DW_TAG_arg_variable ]
75 !31 = metadata !{i32 589839, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_pointer_type ]
76 !32 = metadata !{i32 589846, metadata !2, metadata !"FV", metadata !15, i32 25, i64 0, i64 0, i64 0, i32 0, metadata !33} ; [ DW_TAG_typedef ]
77 !33 = metadata !{i32 589847, metadata !2, metadata !"", metadata !15, i32 22, i64 128, i64 128, i64 0, i32 0, i32 0, metadata !34, i32 0, i32 0} ; [ DW_TAG_union_type ]
78 !34 = metadata !{metadata !35, metadata !37}
79 !35 = metadata !{i32 589837, metadata !15, metadata !"V", metadata !15, i32 23, i64 128, i64 128, i64 0, i32 0, metadata !36} ; [ DW_TAG_member ]
80 !36 = metadata !{i32 589846, metadata !2, metadata !"v4sf", metadata !15, i32 3, i64 0, i64 0, i64 0, i32 0, metadata !6} ; [ DW_TAG_typedef ]
81 !37 = metadata !{i32 589837, metadata !15, metadata !"A", metadata !15, i32 24, i64 128, i64 32, i64 0, i32 0, metadata !38} ; [ DW_TAG_member ]
82 !38 = metadata !{i32 589825, metadata !2, metadata !"", metadata !2, i32 0, i64 128, i64 32, i32 0, i32 0, metadata !7, metadata !8, i32 0, i32 0} ; [ DW_TAG_array_type ]
83 !39 = metadata !{i32 79, i32 7, metadata !40, null}
84 !40 = metadata !{i32 589835, metadata !41, i32 75, i32 35, metadata !1, i32 18} ; [ DW_TAG_lexical_block ]
85 !41 = metadata !{i32 589835, metadata !42, i32 75, i32 5, metadata !1, i32 17} ; [ DW_TAG_lexical_block ]
86 !42 = metadata !{i32 589835, metadata !43, i32 71, i32 32, metadata !1, i32 16} ; [ DW_TAG_lexical_block ]
87 !43 = metadata !{i32 589835, metadata !25, i32 71, i32 3, metadata !1, i32 15} ; [ DW_TAG_lexical_block ]
88 !44 = metadata !{i32 75, i32 5, metadata !42, null}
89 !45 = metadata !{i32 42, i32 2, metadata !46, metadata !48}
90 !46 = metadata !{i32 589835, metadata !47, i32 42, i32 2, metadata !15, i32 20} ; [ DW_TAG_lexical_block ]
91 !47 = metadata !{i32 589835, metadata !14, i32 41, i32 28, metadata !15, i32 19} ; [ DW_TAG_lexical_block ]
92 !48 = metadata !{i32 95, i32 3, metadata !25, null}
93 !49 = metadata !{i32 99, i32 3, metadata !25, null}