]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/powerpc-power7.exp
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-power7.exp
CommitLineData
3666a048 1# Copyright 2014-2021 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 power7"
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 "lxvd2x vs3,r4,r5"
65func_check "lxvd2x vs43,r4,r5"
66func_check "stxvd2x vs3,r4,r5"
67func_check "stxvd2x vs43,r4,r5"
68func_check "xxmrghd vs3,vs4,vs5"
69func_check "xxmrghd vs43,vs44,vs45"
70func_check "xxmrgld vs3,vs4,vs5"
71func_check "xxmrgld vs43,vs44,vs45"
65b48a81
PB
72func_check "xxpermdi vs3,vs4,vs5,1"
73func_check "xxpermdi vs43,vs44,vs45,1"
74func_check "xxpermdi vs3,vs4,vs5,2"
75func_check "xxpermdi vs43,vs44,vs45,2"
76func_check "xvmovdp vs3,vs4"
77func_check "xvmovdp vs43,vs44"
65b48a81
PB
78func_check "xvcpsgndp vs3,vs4,vs5"
79func_check "xvcpsgndp vs43,vs44,vs45"
80func_check "doze"
81func_check "nap"
82func_check "sleep"
83func_check "rvwinkle"
84func_check "prtyw r3,r4"
85func_check "prtyd r13,r14"
86func_check "mfcfar r10"
87func_check "mtcfar r11"
88func_check "cmpb r3,r4,r5"
89func_check "lwzcix r10,r11,r12"
90func_check "dadd f16,f17,f18"
91func_check "daddq f20,f22,f24"
92func_check "dss 3"
93func_check "dssall"
94func_check "dst r5,r4,1"
95func_check "dstt r8,r7,0"
96func_check "dstst r5,r6,3"
97func_check "dststt r4,r5,2"
98func_check "divwe r10,r11,r12"
99func_check "divwe. r11,r12,r13"
100func_check "divweo r12,r13,r14"
101func_check "divweo. r13,r14,r15"
102func_check "divweu r10,r11,r12"
103func_check "divweu. r11,r12,r13"
104func_check "divweuo r12,r13,r14"
105func_check "divweuo. r13,r14,r15"
106func_check "bpermd r7,r17,r27"
107func_check "popcntw r10,r20"
108func_check "popcntd r10,r20"
109func_check "ldbrx r20,r21,r22"
110func_check "stdbrx r20,r21,r22"
111func_check "lfiwzx f10,0,r10"
112func_check "lfiwzx f10,r9,r10"
113func_check "fcfids f4,f5"
114func_check "fcfids. f4,f5"
115func_check "fcfidus f4,f5"
116func_check "fcfidus. f4,f5"
117func_check "fctiwu f4,f5"
118func_check "fctiwu. f4,f5"
119func_check "fctiwuz f4,f5"
120func_check "fctiwuz. f4,f5"
121func_check "fctidu f4,f5"
122func_check "fctidu. f4,f5"
123func_check "fctiduz f4,f5"
124func_check "fctiduz. f4,f5"
125func_check "fcfidu f4,f5"
126func_check "fcfidu. f4,f5"
127func_check "ftdiv cr0,f10,f11"
128func_check "ftdiv cr7,f10,f11"
129func_check "ftsqrt cr0,f10"
130func_check "ftsqrt cr7,f10"
131func_check "dcbtt r8,r9"
132func_check "dcbtstt r8,r9"
133func_check "dcffix f10,f12"
134func_check "dcffix. f20,f22"
135func_check "fre f14,f15"
136func_check "fre. f14,f15"
137func_check "fres f14,f15"
138func_check "fres. f14,f15"
139func_check "frsqrte f14,f15"
140func_check "frsqrte. f14,f15"
141func_check "frsqrtes f14,f15"
142func_check "frsqrtes. f14,f15"
143func_check "isel r2,r3,r4,28"
144func_check "yield"
65b48a81
PB
145func_check "ori r2,r2,0"
146func_check "nop"
65b48a81 147func_check "mdoio"
65b48a81
PB
148func_check "mdoom"
149func_check "mfppr r10"
150func_check "mfppr32 r11"
151func_check "mtppr r12"
152func_check "mtppr32 r13"
153func_check "tlbie r10,r11"