public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Jeff Law <law@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Bernd Schmidt <bschmidt@redhat.com>
Subject: Re: [ptx] Fix sso tests
Date: Tue, 24 Nov 2015 14:03:00 -0000	[thread overview]
Message-ID: <56546BED.5040102@acm.org> (raw)
In-Reply-To: <5653EF0F.6090301@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On 11/24/15 00:01, Jeff Law wrote:
> On 11/23/2015 01:54 PM, Nathan Sidwell wrote:
>> On 11/23/15 15:41, Jeff Law wrote:
>>
>>
>>> In the 'put' function, why not just make all targets go through
>>> putchar?  It's not like this is performance critical code and I
>>> don't think it compromises any of the tests, does it?
>>
>> I contemplated that, but wondered if someone would complain.  I'm
>> happy either way.
> Let's go with a single codepath here.  The one that ought to work for all
> targets is putchar.

Done.

nathan


[-- Attachment #2: trunk-tests.patch --]
[-- Type: text/x-patch, Size: 734 bytes --]

2015-11-24  Nathan Sidwell  <nathan@acm.org>

	* gcc.dg/sso/dump.h: Force IO to be putchar function call on nvptx.

Index: gcc/testsuite/gcc.dg/sso/dump.h
===================================================================
--- gcc/testsuite/gcc.dg/sso/dump.h	(revision 230809)
+++ gcc/testsuite/gcc.dg/sso/dump.h	(working copy)
@@ -1,3 +1,8 @@
+#ifdef __nvptx__
+/* Force function call.  NVPTX's IO is extremely limited.  */
+#undef putchar
+#endif
+
 void dump (void *p, unsigned int len)
 {
   const char digits[17] = "0123456789abcdef";
@@ -14,7 +19,9 @@ void dump (void *p, unsigned int len)
 
 void put (const char s[])
 {
-  fputs (s, stdout);
+  int i;
+  for (i = 0; s[i]; i++)
+    putchar (s[i]);
 }
 
 void new_line (void)

  reply	other threads:[~2015-11-24 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 20:20 Nathan Sidwell
2015-11-23 20:45 ` Jeff Law
2015-11-23 21:00   ` Nathan Sidwell
2015-11-24  5:38     ` Jeff Law
2015-11-24 14:03       ` Nathan Sidwell [this message]
2015-11-24  8:20 ` Thomas Schwinge

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=56546BED.5040102@acm.org \
    --to=nathan@acm.org \
    --cc=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).