mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
RISC-V: Give stack slots same align as XLEN.
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.
This commit is contained in:
parent
dd9168931f
commit
174f8ac8d4
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -1925,12 +1925,13 @@ riscv_call_arg_scalar_int (struct riscv_arg_info *ainfo,
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user