]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/aarch64-fp.exp
update copyright year range in GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / aarch64-fp.exp
CommitLineData
61baf725 1# Copyright 2008-2017 Free Software Foundation, Inc.
bf330350
CU
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, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16#
17# This file is part of the gdb testsuite.
18
19# PR server/17457
20# Test aarch64 floating point registers q0, q1, v0, v1, fpsr, fpcr
21
4931af25 22if {![is_aarch64_target]} {
bf330350
CU
23 verbose "Skipping ${gdb_test_file_name}."
24 return
25}
26
27standard_testfile
5b362f04 28if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
bf330350
CU
29 return -1
30}
31
32if ![runto_main] {
33 untested "could not run to main"
34 return -1
35}
36
37set endianness "little"
38set test "show endian"
39gdb_test_multiple $test $test {
40 -re "(.* )(big|little)( endian.*)$gdb_prompt $" {
41 set endianness $expect_out(2,string)
42 pass "endianness"
43 }
44}
45
46gdb_test "break ${srcfile}:[gdb_get_line_number "return"]" \
47 "Breakpoint $decimal at 0x\[0-9a-fA-F\]+: file .*${srcfile}.*\\\." \
48 "set the breakpoint after setting the fp registers"
49
50gdb_test "continue" \
51 "Continuing.*Breakpoint $decimal.*" \
52 "continue until breakpoint"
53
54if {$endianness == "little"} {
55 set reg_value0 "0x1f1e1d1c1b1a19181716151413121110"
56 set reg_value1 "0x2f2e2d2c2b2a29282726252423222120"
57} else {
58 set reg_value0 "0x101112131415161718191a1b1c1d1e1f"
59 set reg_value1 "0x202122232425262728292a2b2c2d2e2f"
60}
61
62gdb_test "info registers q0" \
63 "q0.*{u = $reg_value0, s = $reg_value0.*" \
64 "check register q0 value"
65
66gdb_test "info registers q1" \
67 "q1.*{u = $reg_value1, s = $reg_value1.*" \
68 "check register q1 value"
69
70gdb_test "info registers v0" \
71 "v0.*$reg_value0}}}" \
72 "check register v0 value"
73
74gdb_test "info registers v1" \
75 "v1.*$reg_value1}}}" \
76 "check register v1 value"
77
78gdb_test "info registers fpsr" \
79 "fpsr.*0x\[0-9a-fA-F\].*" \
80 "check register fpsr value"
81
82gdb_test "info registers fpcr" \
83 "fpcr.*0x\[0-9a-fA-F\].*" \
84 "check register fpcr value"
85