f22689d6f053d0a00ef115a130eb8721a23a9004
[platform/upstream/gdb.git] / gdb / testsuite / gdb.arch / thumb-singlestep.S
1 /* Test program with deliberately incorrect execution mode transition
2
3    Copyright 2011-2015 Free Software Foundation, Inc.
4
5    This file is part of GDB.
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20         .text
21         .align 2
22         .global foo
23         .thumb
24         /* .thumb_func deliberately omitted */
25 foo:
26         mov r0,#42
27         bx lr
28
29         .text
30         .align  2
31         .global main
32         .thumb
33         .thumb_func
34         .type   main, %function
35 main:
36         push    {r3, lr}
37         blx     foo
38         pop     {r3, pc}
39         .size   main, .-main
40