public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Change riscv_return_value to use RETURN_VALUE_ABI_PRESERVES_ADDRESS Date: Wed, 5 Jan 2022 19:38:15 +0000 (GMT) [thread overview] Message-ID: <20220105193815.7C75E385840C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d4be21dce768ba5cddc300544a4953748187982c commit d4be21dce768ba5cddc300544a4953748187982c Author: Tom Tromey <tromey@adacore.com> Date: Tue Dec 14 08:46:59 2021 -0700 Change riscv_return_value to use RETURN_VALUE_ABI_PRESERVES_ADDRESS Internally, AdaCore has a test that is equivalent to (really a direct translation of) gdb.base/gnu_vector.exp. On 32-bit RISC-V, the "return" part of this test fails. Joel tracked this down to riscv_return_value returning RETURN_VALUE_ABI_RETURNS_ADDRESS. Using RETURN_VALUE_ABI_PRESERVES_ADDRESS is more correct here, and fixes the bug. I tested this for both 32- and 64-bit RISC-V using the AdaCore internal test suite, and Andrew Burgess tested it using gnu_vector.exp. Diff: --- gdb/riscv-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 5a6269887e7..886996ce5b7 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -3301,7 +3301,7 @@ riscv_return_value (struct gdbarch *gdbarch, case riscv_arg_info::location::in_reg: return RETURN_VALUE_REGISTER_CONVENTION; case riscv_arg_info::location::by_ref: - return RETURN_VALUE_ABI_RETURNS_ADDRESS; + return RETURN_VALUE_ABI_PRESERVES_ADDRESS; case riscv_arg_info::location::on_stack: default: error (_("invalid argument location"));
reply other threads:[~2022-01-05 19:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220105193815.7C75E385840C@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).