diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.ada/float-bits.exp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/float-bits.exp b/gdb/testsuite/gdb.ada/float-bits.exp index 55a0566..921fe36 100644 --- a/gdb/testsuite/gdb.ada/float-bits.exp +++ b/gdb/testsuite/gdb.ada/float-bits.exp @@ -73,12 +73,40 @@ set gdb_long_double_size [float_size "16llf#0#" ] # example, IEEE quad versus i387 long doubles. Account for that in the # tests below. +# Get the used long double format. +set long_double_format "" +gdb_test_multiple "maint print architecture" "" { + -re "\r\ngdbarch_dump: long_double_format = (\[^\r\n\]*)" { + set long_double_format $expect_out(1,string) + exp_continue + } + -re -wrap "" { + pass $gdb_test_name + } +} + # Set default values for 128-bit IEEE quad long doubles. set valid_long_double "16llf#4000921fb54442d18469898cc51701b8#" set printed_long_double "3.1415926535897932384626433832795028" set invalid_long_double "" set has_invalid_long_double 0 +switch -glob $long_double_format { + floatformat_ibm_long_double_* { + set w1 c1e1c00000000000 + set w2 4544adf4b7320335 + switch $long_double_format { + floatformat_ibm_long_double_big { + set valid_long_double "16llf#$w2$w1#" + } + floatformat_ibm_long_double_little { + set valid_long_double "16llf#$w1$w2#" + } + } + set printed_long_double "50000000000000000000000000.0" + } +} + if { [istarget x86_64-*-* ] || [istarget i?86-*-*] } { # i387 long double have invalid values set has_invalid_long_double 1 |