GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
[binutils-gdb.git] / gdb / testsuite / gdb.arch / mips-fcr.exp
blobd7a39fb101cfae3cb95d7a6974002b1187099514
1 # Copyright (C) 2016-2024 Free Software Foundation, Inc.
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.
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.
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/>.
16 # Contributed by Imagination Technologies, written by Maciej W. Rozycki.
18 # Test MIPS Floating Point Control Register handling.
20 require {istarget "mips*-*-*"}
22 standard_testfile
24 if { [prepare_for_testing "failed to prepare" ${testfile}] } {
25 return
28 if ![runto_main] {
29 return
32 # First check if we have an FPU available in the first place.
33 gdb_test_multiple "show mipsfpu" "check for MIPS floating-point coprocessor" {
34 -re "The MIPS floating-point coprocessor .*\(absent\|unknown\).*$gdb_prompt $" {
35 unsupported "no MIPS floating-point coprocessor in the processor"
36 return
38 -re "The MIPS floating-point coprocessor .*$gdb_prompt $" {
39 verbose "MIPS floating-point coprocessor check successful."
41 default {
42 fail
43 return
47 # Now check that FCRs are accessible and 32-bit wide.
48 gdb_test "info registers \$fcsr" "fcsr: $hex"
49 gdb_test "print sizeof \$fcsr" "\\\$$decimal = 4"
50 gdb_test "info registers \$fir" "fir: $hex"
51 gdb_test "print sizeof \$fir" "\\\$$decimal = 4"