* mips-tdep.c (mips_n32n64_push_dummy_call): Sign-extend
integers and 32-bit pointers as required by the ABI.
This commit is contained in:
parent
1e9836570f
commit
5863b5d536
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-12-20 David Ung <davidu@mips.com>
|
||||||
|
Maciej W. Rozycki <macro@mips.com>
|
||||||
|
|
||||||
|
* mips-tdep.c (mips_n32n64_push_dummy_call): Sign-extend
|
||||||
|
integers and 32-bit pointers as required by the ABI.
|
||||||
|
|
||||||
2007-12-20 Joel Brobecker <brobecker@adacore.com>
|
2007-12-20 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* symtab.h: Remove "defs.h" #include.
|
* symtab.h: Remove "defs.h" #include.
|
||||||
|
|
|
@ -3184,8 +3184,21 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
purpose register. */
|
purpose register. */
|
||||||
if (argreg <= MIPS_LAST_ARG_REGNUM)
|
if (argreg <= MIPS_LAST_ARG_REGNUM)
|
||||||
{
|
{
|
||||||
LONGEST regval =
|
LONGEST regval;
|
||||||
extract_unsigned_integer (val, partial_len);
|
|
||||||
|
/* Sign extend pointers, 32-bit integers and signed
|
||||||
|
16-bit and 8-bit integers; everything else is taken
|
||||||
|
as is. */
|
||||||
|
|
||||||
|
if ((partial_len == 4
|
||||||
|
&& (typecode == TYPE_CODE_PTR
|
||||||
|
|| typecode == TYPE_CODE_INT))
|
||||||
|
|| (partial_len < 4
|
||||||
|
&& typecode == TYPE_CODE_INT
|
||||||
|
&& !TYPE_UNSIGNED (arg_type)))
|
||||||
|
regval = extract_signed_integer (val, partial_len);
|
||||||
|
else
|
||||||
|
regval = extract_unsigned_integer (val, partial_len);
|
||||||
|
|
||||||
/* A non-floating-point argument being passed in a
|
/* A non-floating-point argument being passed in a
|
||||||
general register. If a struct or union, and if
|
general register. If a struct or union, and if
|
||||||
|
|
Loading…
Reference in a new issue