diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-17 14:33:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-17 14:33:56 +0000 |
commit | 9a0149c65a012913bb17e5d44a331d0a0e7cfa15 (patch) | |
tree | 3d6915c2d3ba3ff77c632a8daf57d563321fc6b8 /gdb/mips-tdep.c | |
parent | 59d521c1795f3a42344b6986aafbe233a30bbc06 (diff) | |
download | fsf-binutils-gdb-9a0149c65a012913bb17e5d44a331d0a0e7cfa15.zip fsf-binutils-gdb-9a0149c65a012913bb17e5d44a331d0a0e7cfa15.tar.gz fsf-binutils-gdb-9a0149c65a012913bb17e5d44a331d0a0e7cfa15.tar.bz2 |
For MIPS_EABI, squeeze simple floating point structs into an FP register.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 94e96ca..d14eaea 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2143,7 +2143,14 @@ mips_push_arguments (nargs, args, sp, struct_return, struct_addr) don't use float registers for arguments. This duplication of arguments in general registers can't hurt non-MIPS16 functions because those registers are normally skipped. */ - if (typecode == TYPE_CODE_FLT + /* MIPS_EABI squeeses a struct that contains a single floating + point value into an FP register instead of pusing it onto the + stack. */ + if ((typecode == TYPE_CODE_FLT + || (MIPS_EABI + && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION) + && TYPE_NFIELDS (arg_type) == 1 + && TYPE_CODE (TYPE_FIELD_TYPE (arg_type, 0)) == TYPE_CODE_FLT)) && float_argreg <= MIPS_LAST_FP_ARG_REGNUM && MIPS_FPU_TYPE != MIPS_FPU_NONE) { |