9548cfe
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
9548cfe
9548cfe
The original testcase
9548cfe
	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
9548cfe
requires too recent GCC.
9548cfe
9548cfe
9548cfe
--- /dev/null	1 Jan 1970 00:00:00 -0000
9548cfe
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp	25 Feb 2007 18:27:39 -0000
aad703f
@@ -0,0 +1,54 @@
9548cfe
+# Copyright 2007 Free Software Foundation, Inc.
9548cfe
+
9548cfe
+# This program is free software; you can redistribute it and/or modify
9548cfe
+# it under the terms of the GNU General Public License as published by
9548cfe
+# the Free Software Foundation; either version 2 of the License, or
9548cfe
+# (at your option) any later version.
9548cfe
+#
9548cfe
+# This program is distributed in the hope that it will be useful,
9548cfe
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
9548cfe
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9548cfe
+# GNU General Public License for more details.
9548cfe
+#
9548cfe
+# You should have received a copy of the GNU General Public License
9548cfe
+# along with this program; if not, write to the Free Software
9548cfe
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
9548cfe
+
9548cfe
+# Test PowerPC Power6 instructions disassembly.
9548cfe
+
9548cfe
+if {![istarget "powerpc*-*-*"]} then {
9548cfe
+    verbose "Skipping PowerPC Power6 instructions disassembly."
9548cfe
+    return
9548cfe
+}
9548cfe
+
9548cfe
+set testfile "powerpc-power6"
9548cfe
+set srcfile ${testfile}.s
9548cfe
+set objfile ${objdir}/${subdir}/${testfile}.o
9548cfe
+
9548cfe
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
9548cfe
+    untested "PowerPC prologue tests"
9548cfe
+    return -1
9548cfe
+}
9548cfe
+
9548cfe
+
9548cfe
+gdb_exit
9548cfe
+gdb_start
9548cfe
+gdb_reinitialize_dir $srcdir/$subdir
9548cfe
+gdb_load ${objfile}
9548cfe
+
9548cfe
+# Disassemble the function.
9548cfe
+
9548cfe
+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly"
9548cfe
+
aad703f
+gdb_test "disass func" ":\tdcbzl  *r8,r9\r\n.*" "Power5 disassembly dcbzl"
aad703f
+gdb_test "disass func" ":\tfrsqrtes  *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
aad703f
+gdb_test "disass func" ":\tdadd  *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
aad703f
+gdb_test "disass func" ":\tdaddq  *f1,f2,f1\r\n.*" "Power6 disassembly daddq"
aad703f
+gdb_test "disass func" ":\tdsub  *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
aad703f
+gdb_test "disass func" ":\tdsubq  *f1,f2,f1\r\n.*" "Power6 disassembly dsubq"
aad703f
+gdb_test "disass func" ":\tdmul  *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
aad703f
+gdb_test "disass func" ":\tdmulq  *f1,f2,f1\r\n.*" "Power6 disassembly dmulq"
aad703f
+gdb_test "disass func" ":\tddiv  *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
aad703f
+gdb_test "disass func" ":\tddivq  *f1,f2,f1\r\n.*" "Power6 disassembly ddivq"
aad703f
+gdb_test "disass func" ":\tdcmpu  *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
aad703f
+gdb_test "disass func" ":\tdcmpuq  *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq"
9548cfe
--- /dev/null	1 Jan 1970 00:00:00 -0000
9548cfe
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.s	25 Feb 2007 18:27:39 -0000
aad703f
@@ -0,0 +1,16 @@
9548cfe
+	.text
9548cfe
+	.globl	func
9548cfe
+func:
9548cfe
+	blr
aad703f
+	.long	0x7c284fec	/* dcbzl	r8,r9		*/
aad703f
+	.long	0xed405834	/* frsqrtes	f10,f11		*/
aad703f
+	.long	0xec220804	/* dadd		f1,f2,f1	*/
aad703f
+	.long	0xfc220804	/* daddq	f1,f2,f1	*/
aad703f
+	.long	0xec220c04	/* dsub		f1,f2,f1	*/
aad703f
+	.long	0xfc220c04	/* dsubq	f1,f2,f1	*/
aad703f
+	.long	0xec220844	/* dmul		f1,f2,f1	*/
aad703f
+	.long	0xfc220844	/* dmulq	f1,f2,f1	*/
aad703f
+	.long	0xec220c44	/* ddiv		f1,f2,f1	*/
aad703f
+	.long	0xfc220c44	/* ddivq	f1,f2,f1	*/
aad703f
+	.long	0xec820d04	/* dcmpu	cr1,f2,f1	*/
aad703f
+	.long	0xfc820d04	/* dcmpuq	cr1,f2,f1	*/