This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] S390: Use soft float in s390-tdbregs test case
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Thu, 18 Jan 2018 20:09:04 +0000
- Subject: Re: [pushed] S390: Use soft float in s390-tdbregs test case
- Authentication-results: sourceware.org; auth=none
- References: <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