]>
Commit | Line | Data |
---|---|---|
c0586a34 JB |
1 | /* This testcase is part of GDB, the GNU debugger. |
2 | ||
6aba47ca | 3 | Copyright 2004, 2007 Free Software Foundation, Inc. |
c0586a34 JB |
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, Boston, MA 02111-1307, | |
18 | USA. */ | |
19 | ||
20 | void li_stw (void); | |
21 | ||
22 | int | |
23 | main (void) | |
24 | { | |
25 | li_stw (); | |
26 | return 0; | |
27 | } | |
28 | ||
29 | /* Asm for procedure li_stw(). | |
30 | ||
31 | The purpose of this function is to verify that GDB does not | |
32 | include the li insn as part of the function prologue (only part | |
33 | of the prologue if part of a pair of insns saving vector registers). | |
34 | Similarly, GDB should not include the stw insn following the li insn, | |
35 | because the source register is not used for parameter passing. */ | |
36 | ||
37 | ||
38 | asm (" .csect .text[PR]\n" | |
39 | " .align 2\n" | |
40 | " .lglobl .li_stw\n" | |
41 | " .csect li_stw[DS]\n" | |
42 | "li_stw:\n" | |
43 | " .long .li_stw, TOC[tc0], 0\n" | |
44 | " .csect .text[PR]\n" | |
45 | ".li_stw:\n" | |
46 | " stw 31,-4(1)\n" | |
47 | " stwu 1,-48(1)\n" | |
48 | " mr 31,1\n" | |
49 | " stw 11,24(31)\n" | |
50 | " li 0,8765\n" | |
51 | " stw 0,28(31)\n" | |
52 | " lwz 1,0(1)\n" | |
53 | " lwz 31,-4(1)\n" | |
54 | " blr\n"); | |
55 |