]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/powerpc-vsx2.exp
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-vsx2.exp
CommitLineData
e2882c85 1# Copyright 2014-2018 Free Software Foundation, Inc.
65b48a81
PB
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16# This file is part of the gdb testsuite.
17
18# Test PowerPC instructions disassembly.
19
20standard_testfile .s
21set objfile [standard_output_file ${testfile}.o]
22
23if {![istarget "powerpc*-*-*"]} then {
24 verbose "Skipping PowerPC instructions disassembly."
25 return
26}
27
28if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
29 untested "PowerPC instructions disassembly"
30 return -1
31}
32
33clean_restart ${objfile}
34
35# Disassemble the function.
36set func ""
37
38gdb_test "set disassembler-options vsx"
39set test "disass func"
40gdb_test_multiple $test $test {
41 -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
42 set func $expect_out(1,string)
43 pass $test
44 }
45}
46
47proc instr_to_patt {instr} {
48 global decimal hex
49 # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
50 return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
51}
52
53proc func_check {instr} {
54 global func
55
56 set test "found: $instr"
57 if [regexp -nocase -line [instr_to_patt $instr] $func] {
58 pass $test
59 } else {
60 fail $test
61 }
62}
63
64func_check "lxsiwzx vs62,r14,r26"
65func_check "lxsiwzx vs40,0,r25"
66func_check "lxsiwax vs25,0,r26"
67func_check "lxsiwax vs3,0,r3"
68func_check "mfvsrd r12,vs30"
69func_check "mfvsrd r12,vs30"
70func_check "mfvsrd r12,vs62"
71func_check "mfvsrd r12,vs62"
72func_check "mffprwz r20,f12"
73func_check "mffprwz r20,f12"
74func_check "mfvrwz r21,v12"
75func_check "mfvrwz r21,v12"
76func_check "stxsiwx vs14,r9,r14"
77func_check "stxsiwx vs21,0,r8"
78func_check "mtvsrd vs11,r28"
79func_check "mtvsrd vs11,r28"
80func_check "mtvsrd vs43,r29"
81func_check "mtvsrd vs43,r29"
82func_check "mtfprwa f24,r22"
83func_check "mtfprwa f24,r22"
84func_check "mtvrwa v25,r23"
85func_check "mtvrwa v25,r23"
86func_check "mtfprwz f26,r27"
87func_check "mtfprwz f26,r27"
88func_check "mtvrwz v27,r28"
89func_check "mtvrwz v27,r28"
90func_check "lxsspx vs13,r19,r13"
91func_check "lxsspx vs18,0,r13"
92func_check "stxsspx vs43,r2,r4"
93func_check "stxsspx vs55,0,r11"
94func_check "xsaddsp vs54,vs48,vs25"
95func_check "xsmaddasp vs14,vs50,vs1"
96func_check "xssubsp vs26,vs22,vs42"
97func_check "xsmaddmsp vs27,vs53,vs52"
98func_check "xsrsqrtesp vs8,vs59"
99func_check "xssqrtsp vs12,vs41"
100func_check "xsmulsp vs57,vs11,vs32"
101func_check "xsmsubasp vs38,vs20,vs26"
102func_check "xsdivsp vs26,vs19,vs6"
103func_check "xsmsubmsp vs35,vs37,vs55"
104func_check "xsresp vs59,vs8"
105func_check "xsnmaddasp vs44,vs33,vs33"
106func_check "xsnmaddmsp vs17,vs62,vs30"
107func_check "xsnmsubasp vs54,vs52,vs31"
108func_check "xsnmsubmsp vs37,vs5,vs58"
109func_check "xxlorc vs30,vs54,vs44"
110func_check "xxlnand vs49,vs14,vs29"
111func_check "xxleqv vs62,vs22,vs30"
112func_check "xscvdpspn vs60,vs54"
113func_check "xsrsp vs22,vs45"
114func_check "xscvuxdsp vs26,vs59"
115func_check "xscvsxdsp vs38,vs49"
116func_check "xscvspdpn vs59,vs26"
117func_check "fmrgow f24,f14,f2"
118func_check "fmrgew f22,f7,f5"