1 /* Test program for byte registers.
3 Copyright 2010, 2011 Free Software Foundation, Inc.
5 This file is part of GDB.
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.
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.
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/>. */
40 main (int argc
, char **argv
)
42 asm ("mov 0(%0), %%eax\n\t"
43 "mov 4(%0), %%ebx\n\t"
44 "mov 8(%0), %%ecx\n\t"
45 "mov 12(%0), %%edx\n\t"
46 "mov 16(%0), %%esi\n\t"
47 "mov 20(%0), %%edi\n\t"
48 : /* no output operands */
50 : "eax", "ebx", "ecx", "edx", "esi", "edi");
51 asm ("nop"); /* first breakpoint here */
53 asm ("mov 24(%0), %%r8d\n\t"
54 "mov 28(%0), %%r9d\n\t"
55 "mov 32(%0), %%r10d\n\t"
56 "mov 36(%0), %%r11\n\t"
57 "mov 40(%0), %%r12d\n\t"
58 "mov 44(%0), %%r13d\n\t"
59 "mov 48(%0), %%r14d\n\t"
60 "mov 52(%0), %%r15d\n\t"
61 : /* no output operands */
63 : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15");
64 asm ("nop"); /* second breakpoint here */
66 asm ("mov %%eax, 0(%0)\n\t"
67 "mov %%ebx, 4(%0)\n\t"
68 "mov %%ecx, 8(%0)\n\t"
69 "mov %%edx, 12(%0)\n\t"
70 "mov %%esi, 16(%0)\n\t"
71 "mov %%edi, 20(%0)\n\t"
72 : /* no output operands */
74 : "eax", "ebx", "ecx", "edx", "esi", "edi");
75 asm ("nop"); /* third breakpoint here */
77 asm ("mov %%r8d, 24(%0)\n\t"
78 "mov %%r9d, 28(%0)\n\t"
79 "mov %%r10d, 32(%0)\n\t"
80 "mov %%r11d, 36(%0)\n\t"
81 "mov %%r12d, 40(%0)\n\t"
82 "mov %%r13d, 44(%0)\n\t"
83 "mov %%r14d, 48(%0)\n\t"
84 "mov %%r15d, 52(%0)\n\t"
85 : /* no output operands */
87 : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15");
88 puts ("Bye!"); /* forth breakpoint here */
This page took 0.047012 seconds and 4 git commands to generate.