aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/msp430-tdep.c12
2 files changed, 15 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index de4606d..667bf27 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-29 Kevin Buettner <kevinb@redhat.com>
+
+ * msp430-tdep.c (msp430_push_dummy_call): Treat reference, struct,
+ and union arguments the same as pointer arguments when determining
+ size of argument.
+
2015-09-29 James Bowman <james.bowman@ftdichip.com>
* ft32-tdep.c: #include "opcode/ft32.h".
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 896ee57..4c22ee4 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -772,10 +772,16 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
int size = 2;
if (code_model == MSP_LARGE_CODE_MODEL
- && TYPE_CODE (arg_type) == TYPE_CODE_PTR)
+ && (TYPE_CODE (arg_type) == TYPE_CODE_PTR
+ || TYPE_CODE (arg_type) == TYPE_CODE_REF
+ || TYPE_CODE (arg_type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (arg_type) == TYPE_CODE_UNION))
{
- /* Pointer arguments using large memory model are passed
- using entire register. */
+ /* When using the large memory model, pointer,
+ reference, struct, and union arguments are
+ passed using the entire register. (As noted
+ earlier, aggregates are always passed by
+ reference.) */
if (offset != 0)
continue;
size = 4;