gdb/riscv: Apply NaN boxing when writing return values into registers
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 13 Mar 2020 15:50:28 +0000 (15:50 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 25 Mar 2020 11:29:00 +0000 (11:29 +0000)
commitdd8953924b0966e363c27ee38a0663c08f742fa0
tree4c6e18d299e8d9dee3f0f0a4e964ea0a94e08436
parentcf2611febcfa6b7c680de31071c5658e7463eee4
gdb/riscv: Apply NaN boxing when writing return values into registers

When setting up function parameters we already perform NaN boxing, as
required by the RISC-V ABI, however, we don't do this when writing
values into registers as part of setting up a return value.

This commit moves the NaN boxing code into a small helper function,
and then makes use of this function when setting up function
parameters, and also when setting up return values.

This should resolve this failure:

  FAIL: gdb.base/return-nodebug.exp: float: full width of the returned result

gdb/ChangeLog:

PR gdb/25489
* riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
(riscv_regcache_cooked_write): New function.
(riscv_push_dummy_call): Use new function.
(riscv_return_value): Likewise.
gdb/ChangeLog
gdb/riscv-tdep.c
This page took 0.023957 seconds and 4 git commands to generate.