From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28477 invoked by alias); 18 Jan 2018 20:09:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28468 invoked by uid 89); 18 Jan 2018 20:09:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=transaction X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jan 2018 20:09:52 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 236E580468; Thu, 18 Jan 2018 20:09:51 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DBF378E97; Thu, 18 Jan 2018 20:09:22 +0000 (UTC) Subject: Re: [pushed] S390: Use soft float in s390-tdbregs test case To: Andreas Arnez , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: <371c4fd2-c97a-ec0c-c344-709826c145cb@redhat.com> Date: Thu, 18 Jan 2018 20:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00383.txt.bz2 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