This commit fixes some test failures in gdb.base/varargs.exp when
running on targets with floating point hardware. Floating point
unnamed (variadic) arguments should be passed in integer registers
according to the abi.
After this commit I see no failures in gdb.base/varargs.exp on 32 or
64 bit targets with floating point hardware.
gdb/ChangeLog:
* riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
arguments are passed in integer registers.
(riscv_call_arg_complex_float): Likewise.
+2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
+ arguments are passed in integer registers.
+ (riscv_call_arg_complex_float): Likewise.
+
2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* nat/linux-osdata.c (common_getter): New function.
riscv_call_arg_scalar_float (struct riscv_arg_info *ainfo,
struct riscv_call_info *cinfo)
{
- if (ainfo->length > cinfo->flen)
+ if (ainfo->length > cinfo->flen || ainfo->is_unnamed)
return riscv_call_arg_scalar_int (ainfo, cinfo);
else
{
struct riscv_call_info *cinfo)
{
if (ainfo->length <= (2 * cinfo->flen)
- && riscv_arg_regs_available (&cinfo->float_regs) >= 2)
+ && riscv_arg_regs_available (&cinfo->float_regs) >= 2
+ && !ainfo->is_unnamed)
{
bool result;
int len = ainfo->length / 2;