OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.arch/] [i386-pseudo.c] - Blame information for rev 357

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
/* Test program for byte registers.
2
 
3
   Copyright 2010 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
#include <stdio.h>
21
 
22
int data[] = {
23
  0x14131211,
24
  0x24232221,
25
  0x34333231,
26
  0x44434241,
27
};
28
 
29
int
30
main (int argc, char **argv)
31
{
32
  asm ("mov 0(%0), %%eax\n\t"
33
       "mov 4(%0), %%ebx\n\t"
34
       "mov 8(%0), %%ecx\n\t"
35
       "mov 12(%0), %%edx\n\t"
36
       : /* no output operands */
37
       : "r" (data)
38
       : "eax", "ebx", "ecx", "edx");
39
  asm ("nop"); /* first breakpoint here */
40
 
41
  asm ("mov %%eax, 0(%0)\n\t"
42
       "mov %%ebx, 4(%0)\n\t"
43
       "mov %%ecx, 8(%0)\n\t"
44
       "mov %%edx, 12(%0)\n\t"
45
       : /* no output operands */
46
       : "r" (data)
47
       : "eax", "ebx", "ecx", "edx");
48
  puts ("Bye!"); /* second breakpoint here */
49
 
50
  return 0;
51
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.