]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000 |
2 | ||
3 | The original testcase | |
4 | https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1 | |
5 | requires too recent GCC. | |
6 | ||
7 | ||
8 | --- /dev/null 1 Jan 1970 00:00:00 -0000 | |
9 | +++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000 | |
10 | @@ -0,0 +1,54 @@ | |
11 | +# Copyright 2007 Free Software Foundation, Inc. | |
12 | + | |
13 | +# This program is free software; you can redistribute it and/or modify | |
14 | +# it under the terms of the GNU General Public License as published by | |
15 | +# the Free Software Foundation; either version 2 of the License, or | |
16 | +# (at your option) any later version. | |
17 | +# | |
18 | +# This program is distributed in the hope that it will be useful, | |
19 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | +# GNU General Public License for more details. | |
22 | +# | |
23 | +# You should have received a copy of the GNU General Public License | |
24 | +# along with this program; if not, write to the Free Software | |
25 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
26 | + | |
27 | +# Test PowerPC Power6 instructions disassembly. | |
28 | + | |
29 | +if {![istarget "powerpc*-*-*"]} then { | |
30 | + verbose "Skipping PowerPC Power6 instructions disassembly." | |
31 | + return | |
32 | +} | |
33 | + | |
34 | +set testfile "powerpc-power6" | |
35 | +set srcfile ${testfile}.s | |
36 | +set objfile ${objdir}/${subdir}/${testfile}.o | |
37 | + | |
38 | +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } { | |
39 | + untested "PowerPC prologue tests" | |
40 | + return -1 | |
41 | +} | |
42 | + | |
43 | + | |
44 | +gdb_exit | |
45 | +gdb_start | |
46 | +gdb_reinitialize_dir $srcdir/$subdir | |
47 | +gdb_load ${objfile} | |
48 | + | |
49 | +# Disassemble the function. | |
50 | + | |
51 | +gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly" | |
52 | + | |
53 | +gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl" | |
54 | +gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes" | |
55 | +gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd" | |
56 | +gdb_test "disass func" ":\tdaddq *f1,f2,f1\r\n.*" "Power6 disassembly daddq" | |
57 | +gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub" | |
58 | +gdb_test "disass func" ":\tdsubq *f1,f2,f1\r\n.*" "Power6 disassembly dsubq" | |
59 | +gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul" | |
60 | +gdb_test "disass func" ":\tdmulq *f1,f2,f1\r\n.*" "Power6 disassembly dmulq" | |
61 | +gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv" | |
62 | +gdb_test "disass func" ":\tddivq *f1,f2,f1\r\n.*" "Power6 disassembly ddivq" | |
63 | +gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu" | |
64 | +gdb_test "disass func" ":\tdcmpuq *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq" | |
65 | --- /dev/null 1 Jan 1970 00:00:00 -0000 | |
66 | +++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000 | |
67 | @@ -0,0 +1,16 @@ | |
68 | + .text | |
69 | + .globl func | |
70 | +func: | |
71 | + blr | |
72 | + .long 0x7c284fec /* dcbzl r8,r9 */ | |
73 | + .long 0xed405834 /* frsqrtes f10,f11 */ | |
74 | + .long 0xec220804 /* dadd f1,f2,f1 */ | |
75 | + .long 0xfc220804 /* daddq f1,f2,f1 */ | |
76 | + .long 0xec220c04 /* dsub f1,f2,f1 */ | |
77 | + .long 0xfc220c04 /* dsubq f1,f2,f1 */ | |
78 | + .long 0xec220844 /* dmul f1,f2,f1 */ | |
79 | + .long 0xfc220844 /* dmulq f1,f2,f1 */ | |
80 | + .long 0xec220c44 /* ddiv f1,f2,f1 */ | |
81 | + .long 0xfc220c44 /* ddivq f1,f2,f1 */ | |
82 | + .long 0xec820d04 /* dcmpu cr1,f2,f1 */ | |
83 | + .long 0xfc820d04 /* dcmpuq cr1,f2,f1 */ |