gdb/gdb-rhbz795424-bitpos-20of2...

59 lines
2.0 KiB
Diff

diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index 7a21efc..706b5b4 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -1623,7 +1623,7 @@ riscv_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
/* Compute the alignment of the type T. Used while setting up the
arguments for a dummy call. */
-static int
+static LONGEST
riscv_type_alignment (struct type *t)
{
t = check_typedef (t);
@@ -1644,7 +1644,7 @@ riscv_type_alignment (struct type *t)
case TYPE_CODE_ARRAY:
if (TYPE_VECTOR (t))
- return std::min (TYPE_LENGTH (t), (unsigned) BIGGEST_ALIGNMENT);
+ return std::min (TYPE_LENGTH (t), (ULONGEST) BIGGEST_ALIGNMENT);
/* FALLTHROUGH */
case TYPE_CODE_COMPLEX:
@@ -2134,7 +2134,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo,
&& TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->flen
&& riscv_arg_regs_available (&cinfo->float_regs) >= 2)
{
- int len0, len1, offset;
+ LONGEST len0, len1, offset;
gdb_assert (TYPE_LENGTH (ainfo->type) <= (2 * cinfo->flen));
@@ -2162,7 +2162,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo,
&& is_integral_type (sinfo.field_type (1))
&& TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->xlen))
{
- int len0, len1, offset;
+ LONGEST len0, len1, offset;
len0 = TYPE_LENGTH (sinfo.field_type (0));
if (!riscv_assign_reg_location (&ainfo->argloc[0],
@@ -2185,7 +2185,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo,
&& TYPE_CODE (sinfo.field_type (1)) == TYPE_CODE_FLT
&& TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->flen))
{
- int len0, len1, offset;
+ LONGEST len0, len1, offset;
len0 = TYPE_LENGTH (sinfo.field_type (0));
len1 = TYPE_LENGTH (sinfo.field_type (1));
@@ -2588,7 +2588,7 @@ riscv_return_value (struct gdbarch *gdbarch,
if (readbuf != nullptr || writebuf != nullptr)
{
- unsigned int arg_len;
+ ULONGEST arg_len;
struct value *abi_val;
gdb_byte *old_readbuf = nullptr;
int regnum;