* opcode/i386.h: Add multiple inclusion protection.
[external/binutils.git] / gdb / testsuite / gdb.arch / i386-disp-step.S
1 /* Copyright 2009 Free Software Foundation, Inc.
2
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 3 of the License, or
6    (at your option) any later version.
7
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12
13    You should have received a copy of the GNU General Public License
14    along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16    This file is part of the gdb testsuite.
17    It tests displaced stepping over various insns that require special
18    handling.  */
19
20         .text
21
22         .global main
23 main:
24         nop
25
26 /* test call/ret */
27
28         .global test_call
29 test_call:
30         call test_call_subr
31         nop
32         .global test_ret_end
33 test_ret_end:
34         nop
35
36 /* test syscall */
37
38         .global test_syscall
39         mov $0x14,%eax /* getpid */
40 test_syscall:
41         int $0x80
42         nop
43 test_syscall_end:
44         nop
45
46 /* all done */
47
48         pushl $0
49         call exit
50         hlt
51
52 /***********************************************/
53
54 /* subroutine to help test call/ret */
55
56 test_call_subr:
57         nop
58         .global test_call_end
59 test_call_end:
60         nop
61
62         .global test_ret
63 test_ret:
64         ret