diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1995-04-15 21:13:08 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1995-04-15 21:13:08 +0000 |
commit | b3636ee55ec939d470bd1af69f047d1bf1613066 (patch) | |
tree | e9d49956c9009e62e9684ba1890bf1ea0d424930 /gdb/alpha-tdep.c | |
parent | d7c4766c8c31727516167ca02ab45eb267f052c6 (diff) | |
download | gdb-b3636ee55ec939d470bd1af69f047d1bf1613066.zip gdb-b3636ee55ec939d470bd1af69f047d1bf1613066.tar.gz gdb-b3636ee55ec939d470bd1af69f047d1bf1613066.tar.bz2 |
Sat Apr 15 14:05:09 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
* alpha-tdep.c (alpha_push_arguments): Fix typo (TYPE_VALUE ->
VALUE_TYPE). Do the cast for TYPE_CODE_BOOL, TYPE_CODE_CHAR,
TYPE_CODE_ENUM, and TYPE_CODE_RANGE as well as TYPE_CODE_INT.
Sat Apr 15 14:04:32 1995 Per Bothner <bothner@cygnus.com>
* alpha-tdep.c (alpha_push_arguments): Only cast to long for
TYPE_CODE_INT.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r-- | gdb/alpha-tdep.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index b75155a..10a8d53 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -691,8 +691,19 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr) { value_ptr arg = args[i]; /* Cast argument to long if necessary as the compiler does it too. */ - if (TYPE_LENGTH (VALUE_TYPE (arg)) < TYPE_LENGTH (builtin_type_long)) - arg = value_cast (builtin_type_long, arg); + switch (TYPE_CODE (VALUE_TYPE (arg))) + { + case TYPE_CODE_INT: + case TYPE_CODE_BOOL: + case TYPE_CODE_CHAR: + case TYPE_CODE_RANGE: + case TYPE_CODE_ENUM: + if (TYPE_LENGTH (VALUE_TYPE (arg)) < TYPE_LENGTH (builtin_type_long)) + arg = value_cast (builtin_type_long, arg); + break; + default: + break; + } m_arg->len = TYPE_LENGTH (VALUE_TYPE (arg)); m_arg->offset = accumulate_size; accumulate_size = (accumulate_size + m_arg->len + 7) & ~7; |