OSDN Git Service

Copyright updates for 2007.
[pf3gnuchains/pf3gnuchains4x.git] / gdb / testsuite / gdb.arch / alpha-step.c
1 /* Copyright 2005, 2007 Free Software Foundation, Inc.
2
3    This file is part of GDB.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2 of the License, or
8    (at your option) any later version.
9    
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14    
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 59 Temple Place - Suite 330,
18    Boston, MA 02111-1307, USA.  */
19
20 void gt (double a);
21
22 int
23 main (void)
24 {
25   gt (360.0);
26   gt (-360.0);
27
28   ge (360.0);
29   ge (-360.0);
30
31   lt (-360.0);
32   lt (360.0);
33
34   le (-360.0);
35   le (360.0);
36
37   eq (0.0);
38   eq (360.0);
39
40   ne (360.0);
41   ne (0.0);
42
43   return 0;
44 }
45
46 asm ("       .text\n"
47      "       .ent gt\n"
48      "gt:\n"
49      "       .frame $30,0,$26,0\n"
50      "       .prologue 0\n"
51      "       cpys $f31,$f31,$f0\n"
52      "       fbgt $f16,$gt_1\n"      /* stop at this instruction.  */
53      "       cpysn $f16,$f16,$f0\n"
54      "$gt_1:\n"
55      "       ret $31,($26),1\n"
56      "       .end gt\n");
57
58 asm ("       .text\n"
59      "       .ent ge\n"
60      "ge:\n"
61      "       .frame $30,0,$26,0\n"
62      "       .prologue 0\n"
63      "       cpys $f31,$f31,$f0\n"
64      "       fbge $f16,$ge_1\n"      /* stop at this instruction.  */
65      "       cpysn $f16,$f16,$f0\n"
66      "$ge_1:\n"
67      "       ret $31,($26),1\n"
68      "       .end ge\n");
69
70 asm ("       .text\n"
71      "       .ent lt\n"
72      "lt:\n"
73      "       .frame $30,0,$26,0\n"
74      "       .prologue 0\n"
75      "       cpys $f31,$f31,$f0\n"
76      "       fblt $f16,$lt_1\n"      /* stop at this instruction.  */
77      "       cpysn $f16,$f16,$f0\n"
78      "$lt_1:\n"
79      "       ret $31,($26),1\n"
80      "       .end lt\n");
81
82 asm ("       .text\n"
83      "       .ent le\n"
84      "le:\n"
85      "       .frame $30,0,$26,0\n"
86      "       .prologue 0\n"
87      "       cpys $f31,$f31,$f0\n"
88      "       fble $f16,$le_1\n"      /* stop at this instruction.  */
89      "       cpysn $f16,$f16,$f0\n"
90      "$le_1:\n"
91      "       ret $31,($26),1\n"
92      "       .end le\n");
93
94 asm ("       .text\n"
95      "       .ent eq\n"
96      "eq:\n"
97      "       .frame $30,0,$26,0\n"
98      "       .prologue 0\n"
99      "       cpys $f31,$f31,$f0\n"
100      "       fbeq $f16,$eq_1\n"      /* stop at this instruction.  */
101      "       cpysn $f16,$f16,$f0\n"
102      "$eq_1:\n"
103      "       ret $31,($26),1\n"
104      "       .end eq\n");
105
106 asm ("       .text\n"
107      "       .ent ne\n"
108      "ne:\n"
109      "       .frame $30,0,$26,0\n"
110      "       .prologue 0\n"
111      "       cpys $f31,$f31,$f0\n"
112      "       fbne $f16,$ne_1\n"      /* stop at this instruction.  */
113      "       cpysn $f16,$f16,$f0\n"
114      "$ne_1:\n"
115      "       ret $31,($26),1\n"
116      "       .end ne\n");
117
118