OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.arch/] [powerpc-d128-regs.exp] - Blame information for rev 25

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 25 jlechner
# This testcase is part of GDB, the GNU debugger.
2
 
3
# Copyright 2008
4
# Free Software Foundation, Inc.
5
 
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program.  If not, see .
18
 
19
# Please email any bugs, comments, and/or additions to this file to:
20
# bug-gdb@gnu.org
21
 
22
# Testcase for ppc decimal128 pseudo-registers.
23
 
24
if $tracelevel then {
25
        strace $tracelevel
26
}
27
 
28
if ![istarget "powerpc64-*"] then {
29
    verbose "Skipping powerpc Decimal128 pseudo-registers testcase."
30
    return
31
}
32
 
33
set testfile "powerpc-d128-regs"
34
set srcfile ${testfile}.c
35
set binfile ${objdir}/${subdir}/${testfile}
36
 
37
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
38
     untested powerpc-d128-regs.exp
39
     return -1
40
}
41
 
42
# Start with a fresh gdb.
43
 
44
gdb_exit
45
gdb_start
46
gdb_reinitialize_dir $srcdir/$subdir
47
gdb_load ${binfile}
48
 
49
if { ![runto main] } then {
50
   fail "run to main"
51
   return
52
}
53
 
54
if [gdb_test "show arch" ".*currently powerpc:common.*" "Checking for PPC arch"] {
55
    return -1;
56
}
57
 
58
gdb_test "next" ""
59
 
60
for {set i 0} {$i < 16} {incr i 1} {
61
gdb_test "set \$dl$i=d128" "" "Set dl$i register"
62
 
63
gdb_test "print \$dl$i" "\\\$$decimal = 1\.2345678910" "Print dl$i register as DFP"
64
 
65
gdb_test "info reg dl$i" \
66
         "dl$i\[ \]*1\.2345678910\[\t\]*\\(raw 0x2205800000000000000000049c5de09c\\)" \
67
         "Print dl$i register with the info reg command"
68
 
69
gdb_test "info reg f[expr 2*$i]" \
70
         "f[expr 2*$i]\[ \]*8\.608957309287334e\-145\[\t\]*\\(raw 0x2205800000000000\\)" \
71
         "Testing lower half of dl$i register"
72
 
73
gdb_test "info reg f[expr 2*$i+1]" \
74
         "f[expr 2*$i+1]\[ \]*9\.7841140127686122e\-314\[\t\]*\\(raw 0x000000049c5de09c\\)" \
75
         "Testing upper half of dl$i register"
76
 
77
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.