From: Cupertino Miranda <cupertino.miranda@oracle.com>
To: Leon Hwang <hffilwlqm@gmail.com>
Cc: bpf@vger.kernel.org,
"Jose E. Marchesi" <jose.marchesi@oracle.com>,
david.faust@oracle.com
Subject: Question regarding "Add testcases for tailcall hierarchy fixing"
Date: Thu, 01 Aug 2024 19:41:27 +0100 [thread overview]
Message-ID: <871q38gk6g.fsf@oracle.com> (raw)
Hi Leon,
In the following commit:
commit b83b936f3e9a3c63896852198a1814e90e68eef5
Author: Leon Hwang <hffilwlqm@gmail.com>
selftests/bpf: Add testcases for tailcall hierarchy fixing
you created 2 tests files that contain the following inline assembly.
asm volatile (""::"r+"(ret));
I presume the actual intent is to force the unused ret variable to
exist as a register.
When compiling that line in GCC it produces the following error:
progs/tailcall_bpf2bpf_hierarchy2.c: In function 'tailcall_bpf2bpf_hierarchy_2':
progs/tailcall_bpf2bpf_hierarchy2.c:66:9: error: input operand constraint contains '+'
66 | asm volatile (""::"r+"(ret));
| ^~~
After analysing the reasoning behind the error, the plausible solution
is to change the constraint to "+r" and move it from the input operands
list to output operands, i.e:
asm volatile ("":"+r"(ret));
Can you please confirm that this change would be complient with the test
semantics ?
Regards,
Cupertino
next reply other threads:[~2024-08-01 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 18:41 Cupertino Miranda [this message]
2024-08-02 2:28 ` Question regarding "Add testcases for tailcall hierarchy fixing" Leon Hwang
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=871q38gk6g.fsf@oracle.com \
--to=cupertino.miranda@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=david.faust@oracle.com \
--cc=hffilwlqm@gmail.com \
--cc=jose.marchesi@oracle.com \
/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: link
Be 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