This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PTX] no return fns
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>
- Date: Mon, 7 Dec 2015 20:08:20 +0300 (MSK)
- Subject: Re: [PTX] no return fns
- Authentication-results: sourceware.org; auth=none
- References: <5665B170 dot 9070708 at acm dot org>
Hello Nathan,
On Mon, 7 Dec 2015, Nathan Sidwell wrote:
> This patch changes call emission to look for a noreturn note and emit a trap
> insn after the call. The JIT no longer explodes.
I think there's a potential issue with the patch: when the noreturn function
has a non-void return value, your patch places 'trap' between 'call' and
'ld.param' insns. That violates the PTX specification, which demands:
All st.param instructions used for passing arguments to function call must
immediately precede the corresponding call instruction and ld.param
instruction used for collecting return value must immediately follow the
call instruction without any control flow alteration.
Alexander