diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-01-09 04:42:54 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-01-09 04:42:54 +0000 |
commit | f08877ba090b81d1d4e71202c2e5d970010d7799 (patch) | |
tree | b877783061e83dc9d9a516242e77e5d68aee3874 /gdb/mips-tdep.c | |
parent | e4b97d48eefdc74a491358d5e082d4a23b9fb666 (diff) | |
download | gdb-f08877ba090b81d1d4e71202c2e5d970010d7799.zip gdb-f08877ba090b81d1d4e71202c2e5d970010d7799.tar.gz gdb-f08877ba090b81d1d4e71202c2e5d970010d7799.tar.bz2 |
Wrong return convention for arrays (mips-irix).
* mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
128 bits or smaller are returned the same way as structs
and unions of the the same size.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 92fcd4a..6749c27 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -3379,7 +3379,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct type *func_type, (and $f2 if necessary). This is a generalization of the Fortran COMPLEX case. - * Any other struct or union results of at most 128 bits are returned in + * Any other composite results of at most 128 bits are returned in $2 (first 64 bits) and $3 (remainder, if necessary). * Larger composite results are handled by converting the function to a @@ -3390,8 +3390,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct type *func_type, specific exception to return COMPLEX results in the floating point registers.] */ - if (TYPE_CODE (type) == TYPE_CODE_ARRAY - || TYPE_LENGTH (type) > 2 * MIPS64_REGSIZE) + if (TYPE_LENGTH (type) > 2 * MIPS64_REGSIZE) return RETURN_VALUE_STRUCT_CONVENTION; else if (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 16 @@ -3481,9 +3480,10 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct type *func_type, return RETURN_VALUE_REGISTER_CONVENTION; } else if (TYPE_CODE (type) == TYPE_CODE_STRUCT - || TYPE_CODE (type) == TYPE_CODE_UNION) + || TYPE_CODE (type) == TYPE_CODE_UNION + || TYPE_CODE (type) == TYPE_CODE_ARRAY) { - /* A structure or union. Extract the left justified value, + /* A composite type. Extract the left justified value, regardless of the byte order. I.e. DO NOT USE mips_xfer_lower. */ int offset; |