blob: 2ab85053a91f7c9eb2c1e0c437606345d82b9987 [file] [log] [blame]
Tim Northover3cccc452014-03-12 11:29:23 +00001; RUN: llc -mtriple=armv7-linux-gnueabihf %s -o - | FileCheck %s
2
3; Generated from:
4; void stack_offsets() {
5; asm("" ::: "d8", "d9", "d11", "d13");
6; }
7; Compiled with: "clang -target armv7-linux-gnueabihf -O3"
8
9; The important point we're checking here is that the .cfi directives describe
10; the layout of the VFP registers correctly. The fact that the numbers are
11; monotonic in memory is also a nice property to have.
12
Peter Collingbourned4bff302015-11-05 22:03:56 +000013define void @stack_offsets() !dbg !4 {
Tim Northover3cccc452014-03-12 11:29:23 +000014; CHECK-LABEL: stack_offsets:
15; CHECK: vpush {d13}
16; CHECK: vpush {d11}
17; CHECK: vpush {d8, d9}
18
19; CHECK: .cfi_offset {{269|d13}}, -8
20; CHECK: .cfi_offset {{267|d11}}, -16
21; CHECK: .cfi_offset {{265|d9}}, -24
22; CHECK: .cfi_offset {{264|d8}}, -32
23
24; CHECK: vpop {d8, d9}
25; CHECK: vpop {d11}
26; CHECK: vpop {d13}
27 call void asm sideeffect "", "~{d8},~{d9},~{d11},~{d13}"() #1
28 ret void
29}
30
31!llvm.dbg.cu = !{!0}
32!llvm.module.flags = !{!8, !9}
33
Adrian Prantl75819ae2016-04-15 15:57:41 +000034!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000035!1 = !DIFile(filename: "tmp.c", directory: "/Users/tim/llvm/build")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000036!2 = !{}
Adrian Prantl75819ae2016-04-15 15:57:41 +000037!4 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000038!5 = !DIFile(filename: "tmp.c", directory: "/Users/tim/llvm/build")
39!6 = !DISubroutineType(types: !7)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000040!7 = !{null}
41!8 = !{i32 2, !"Dwarf Version", i32 4}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000042!9 = !{i32 1, !"Debug Info Version", i32 3}
Tim Northover3cccc452014-03-12 11:29:23 +000043