For riscv64-linux target, fixes
FAIL: gdb.base/gnu_vector.exp: call add_many_charvecs
Ensure that stack slots are always the same alignment as XLEN by rounding
up arg align to xlen.
gdb/
* riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
setting len. New local align, set to max of arg align and xlen,
and pass to first riscv_assign_stack_location call.
+2018-11-14 Jim Wilson <jimw@sifive.com>
+
+ * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
+ setting len. New local align, set to max of arg align and xlen,
+ and pass to first riscv_assign_stack_location call.
+
2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
* skip.c (complete_skip_number): New function.
}
else
{
- int len = (ainfo->length > cinfo->xlen) ? cinfo->xlen : ainfo->length;
+ int len = std::min (ainfo->length, cinfo->xlen);
+ int align = std::max (ainfo->align, cinfo->xlen);
if (!riscv_assign_reg_location (&ainfo->argloc[0],
&cinfo->int_regs, len, 0))
riscv_assign_stack_location (&ainfo->argloc[0],
- &cinfo->memory, len, ainfo->align);
+ &cinfo->memory, len, align);
if (len < ainfo->length)
{