diff options
author | Mark Kettenis <kettenis@gnu.org> | 2008-02-02 00:07:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2008-02-02 00:07:57 +0000 |
commit | f964a7562a92762d94cc8c1f6177db2989dcac15 (patch) | |
tree | 639e168efa617e66ef110cb69a3cf3903ebf9955 /gdb | |
parent | 3709d2edc8ba3858bac040e2b82b0fa9ee5b4adf (diff) | |
download | gdb-f964a7562a92762d94cc8c1f6177db2989dcac15.zip gdb-f964a7562a92762d94cc8c1f6177db2989dcac15.tar.gz gdb-f964a7562a92762d94cc8c1f6177db2989dcac15.tar.bz2 |
Luis Machado <luisgpm@br.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Pass floats that
don't fit into registerson the stack the way GCC does.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/ppc-sysv-tdep.c | 22 |
2 files changed, 20 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9adc414..22dfd33 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2008-02-02 Mark Kettenis <kettenis@gnu.org> + Luis Machado <luisgpm@br.ibm.com> + Thiago Jung Bauermann <bauerman@br.ibm.com> + + * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Pass floats that + don't fit into registerson the stack the way GCC does. + 2008-02-01 Joel Brobecker <brobecker@adacore.com> * symtab.c (symbol_set_names): Do not add an entry in the demangling diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index 7a87743..eea2287 100644 --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -129,17 +129,21 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } else { - /* SysV ABI converts floats to doubles before - writing them to an 8 byte aligned stack location. */ - argoffset = align_up (argoffset, 8); + /* The SysV ABI tells us to convert floats to + doubles before writing them to an 8 byte aligned + stack location. Unfortunately GCC does not do + that, and stores floats into 4 byte aligned + locations without converting them to doubles. + Since there is no know compiler that actually + follows the ABI here, we implement the GCC + convention. */ + + /* Align to 4 bytes or 8 bytes depending on the type of + the argument (float or double). */ + argoffset = align_up (argoffset, len); if (write_pass) - { - char memval[8]; - convert_typed_floating (val, type, memval, - builtin_type_ieee_double); write_memory (sp + argoffset, val, len); - } - argoffset += 8; + argoffset += len; } } else if (TYPE_CODE (type) == TYPE_CODE_FLT |