This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Feb 2016 10:56:28 +0300 (MSK)
- Subject: Re: [gomp-nvptx 3/5] nvptx backend: set up stacks in entry code
- Authentication-results: sourceware.org; auth=none
- References: <1455561852-9237-1-git-send-email-amonakov at ispras dot ru> <1455561852-9237-4-git-send-email-amonakov at ispras dot ru> <56CB3539 dot 6050200 at acm dot org> <alpine dot LNX dot 2 dot 20 dot 1602222318320 dot 13825 at monopod dot intra dot ispras dot ru> <56CB7003 dot 3010007 at acm dot org>
On Mon, 22 Feb 2016, Nathan Sidwell wrote:
> On 02/22/16 15:25, Alexander Monakov wrote:
>
> > Template strings have an embedded nul character at the position where ORIG
> > goes, so template_2 is set to point at the position following the embedded
> > nul
> > in template_1. Offset of the embedded nul is the same in each template
> > string, so it doesn't matter which goes into the argument of strlen (but
> > supplying template64 or template32 instead of template_1 allows easier
> > folding).
>
> ew, that's disgusting!
So it'll blend in perfectly well with the rest of the ptx stuff in gcc, right?
Sorry, could not resist.
Please understand that I considered other approaches, and saw none that would
appear more beautiful/less ugly. I'd be happy to add some comments to the
code, similar to my explanatory text above, if that's the problem. If not,
and you actually imply that the code is not good (rather than delivering a
friendly jab) please give me some specific feedback to act on.
Thanks.
Alexander