[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / eh-directive-save-diagnostics.s
blob0fd5582e0498db76cfd894af46cc7c110c23236e
1 @ RUN: not llvm-mc -triple=armv7-unknown-linux-gnueabi < %s 2> %t
2 @ RUN: FileCheck < %t %s
4 @ Check the diagnostics for .save directive
6 @ .save directive should always come after .fnstart directive and
7 @ before .handlerdata directive.
9 .syntax unified
10 .text
12 @-------------------------------------------------------------------------------
13 @ TEST1: .save before .fnstart
14 @-------------------------------------------------------------------------------
15 .globl func1
16 .align 2
17 .type func1,%function
18 .save {r4, r5, r6, r7}
19 @ CHECK: error: .fnstart must precede .save or .vsave directives
20 @ CHECK: .save {r4, r5, r6, r7}
21 @ CHECK: ^
22 .fnstart
23 func1:
24 .fnend
28 @-------------------------------------------------------------------------------
29 @ TEST2: .save after .handlerdata
30 @-------------------------------------------------------------------------------
31 .globl func2
32 .align 2
33 .type func2,%function
34 .fnstart
35 func2:
36 .handlerdata
37 .save {r4, r5, r6, r7}
38 @ CHECK: error: .save or .vsave must precede .handlerdata directive
39 @ CHECK: .save {r4, r5, r6, r7}
40 @ CHECK: ^
41 .fnend