GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
[binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-d128-regs.exp
blob9a935b76a41bc1a2027cea3b538bfb9cf9a6d94d
1 # This testcase is part of GDB, the GNU debugger.
3 # Copyright 2008-2024 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Please email any bugs, comments, and/or additions to this file to:
19 # bug-gdb@gnu.org
21 # Testcase for ppc decimal128 pseudo-registers.
23 require {istarget "powerpc64*-*"}
25 standard_testfile
27 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
28 untested "failed to compile"
29 return -1
32 clean_restart $binfile
34 if {![runto_main]} {
35 return
38 if [gdb_test "show arch" ".*powerpc:common.*" "checking for PPC arch"] {
39 return -1
42 gdb_test "next" ""
44 for {set i 0} {$i < 16} {incr i 1} {
45 gdb_test "set \$dl$i=d128" "" "set dl$i register"
47 gdb_test "print \$dl$i" "\\\$$decimal = 1\.2345678910" "print dl$i register as DFP"
49 gdb_test "info reg dl$i" \
50 "dl$i\[ \]*1\.2345678910\[ \t\]*\\(raw 0x2205800000000000000000049c5de09c\\)" \
51 "print dl$i register with the info reg command"
53 gdb_test "info reg f[expr 2*$i]" \
54 "f[expr 2*$i]\[ \]*8\.608957309287334e\-145\[ \t\]*\\(raw 0x2205800000000000\\)" \
55 "testing lower half of dl$i register"
57 gdb_test "info reg f[expr 2*$i+1]" \
58 "f[expr 2*$i+1]\[ \]*9\.7841140127686122e\-314\[ \t\]*\\(raw 0x000000049c5de09c\\)" \
59 "testing upper half of dl$i register"