Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [pushed] S390: Use soft float in s390-tdbregs test case
Date: Thu, 18 Jan 2018 20:09:00 -0000	[thread overview]
Message-ID: <371c4fd2-c97a-ec0c-c344-709826c145cb@redhat.com> (raw)
In-Reply-To: <m3o9lr0zu7.fsf@oc1027705133.ibm.com>

On 01/18/2018 06:46 PM, Andreas Arnez wrote:
> The GDB test case s390-tdbregs.exp verifies GDB's handling of the
> "transaction diagnostic block".  For simplicity, the test case uses the
> "transaction begin" (TBEGIN) instruction with the "allow floating-point
> operation" flag set to zero.  But some GCC versions may indeed emit
> floating point or vector instructions for this test case.  If this happens
> in the transaction, it aborts, and an endless loop results.
> 
> This change tells the compiler to produce a soft-float binary, so no
> floating-point or vector registers are touched.

I found the rationale above quite instructive.  How about
putting it in the exp file directly?

>  
> -if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
> +# Use soft float, so the compiler doesn't use floating-point or vector
> +# instructions.
> +if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
> +	  [list "debug" "additional_flags=-msoft-float"]] } {
>      return -1

I mean, the comment here alone as is doesn't explain why we'd rather
the compiler not use float-point/vector insns, which I think is a
question people reading the testcase will tend to ask themselves,
and the answer isn't obvious.  At least to me.

Thanks,
Pedro Alves


  reply	other threads:[~2018-01-18 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 18:46 Andreas Arnez
2018-01-18 20:09 ` Pedro Alves [this message]
2018-01-19 13:20   ` Andreas Arnez
2018-01-19 13:52     ` Pedro Alves

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=371c4fd2-c97a-ec0c-c344-709826c145cb@redhat.com \
    --to=palves@redhat.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@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: 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