Blame SOURCES/gdb-6.6-bz230000-power6-disassembly-test.patch

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