diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-08-22 15:13:04 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-08-22 15:13:04 +0000 |
commit | 8d26208a1e22d9720c1423625c7e15f1bc7d237c (patch) | |
tree | 865c53dc061875f491071df2a55cd1fafcf97391 /gdb/testsuite | |
parent | 65728c26984bf8b45c0f473d96443186b5c4ebab (diff) | |
download | gdb-8d26208a1e22d9720c1423625c7e15f1bc7d237c.zip gdb-8d26208a1e22d9720c1423625c7e15f1bc7d237c.tar.gz gdb-8d26208a1e22d9720c1423625c7e15f1bc7d237c.tar.bz2 |
gdb/testsuite/
* gdb.base/callfuncs.exp (do_function_calls): Use t_double_int
and t_int_double.
* gdb.base/callfuncs.c (t_double_int, t_int_double): New.
gdb/
* mips-tdep.c (mips_n32n64_fp_arg_chunk_p): New.
(mips_n32n64_push_dummy_call): Always increment float_argreg along
with argreg. Use mips_n32n64_fp_arg_chunk_p.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.c | 23 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 5 |
3 files changed, 34 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8f95b3f..89b7a10 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-08-22 Daniel Jacobowitz <dan@codesourcery.com> + + * gdb.base/callfuncs.exp (do_function_calls): Use t_double_int + and t_int_double. + * gdb.base/callfuncs.c (t_double_int, t_int_double): New. + 2007-08-17 Joel Brobecker <brobecker@adacore.com> * gdb.base/step-line.c: Switch license to GPL version 3, and diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c index 5a2bde2..3eeebe5 100644 --- a/gdb/testsuite/gdb.base/callfuncs.c +++ b/gdb/testsuite/gdb.base/callfuncs.c @@ -334,6 +334,29 @@ char char_array_arg1[], char_array_arg2[]; !strcmp (char_array_arg2, char_array_val2)); } +#ifdef PROTOTYPES +int t_double_int (double double_arg1, int int_arg2) +#else +int t_double_int (double_arg1, int_arg2) +double double_arg1; +int int_arg2; +#endif +{ + return ((double_arg1 - int_arg2) < DELTA + && (double_arg1 - int_arg2) > -DELTA); +} + +#ifdef PROTOTYPES +int t_int_double (int int_arg1, double double_arg2) +#else +int t_int_double (int_arg1, double_arg2) +int int_arg1; +double double_arg2; +#endif +{ + return ((int_arg1 - double_arg2) < DELTA + && (int_arg1 - double_arg2) > -DELTA); +} /* This used to simply compare the function pointer arguments with known values for func_val1 and func_val2. Doing so is valid ANSI diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 6839abf..7d53e98 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -163,6 +163,11 @@ proc do_function_calls {} { gdb_test "p t_double_values(double_val1,double_val2)" " = 1" gdb_test "p t_double_values(45.654,double_val2)" " = 1" gdb_test "p t_double_values(double_val1,-67.66)" " = 1" + + gdb_test "p t_double_int(99.0, 1)" " = 0" + gdb_test "p t_double_int(99.0, 99)" " = 1" + gdb_test "p t_int_double(99, 1.0)" " = 0" + gdb_test "p t_int_double(99, 99.0)" " = 1" } gdb_test "p t_string_values(string_val2,string_val1)" " = 0" |