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