From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86428 invoked by alias); 26 Feb 2016 08:34:20 -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 86415 invoked by uid 89); 26 Feb 2016 08:34:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=vfp, VFP, NEON, Hx-spam-relays-external:209.85.192.194 X-HELO: mail-pf0-f194.google.com Received: from mail-pf0-f194.google.com (HELO mail-pf0-f194.google.com) (209.85.192.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 26 Feb 2016 08:34:18 +0000 Received: by mail-pf0-f194.google.com with SMTP id q63so1015410pfb.1 for ; Fri, 26 Feb 2016 00:34:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=2rh4zRChQ9oYdOadaAE/2fIOLVwMhdwKRnZnsKfSBlQ=; b=g1DRjpxSVwTyzj5/q3BQQR3jH961DaQsaRwUVy4b1cgelpP8T9FH4gQ3eTnKvPqbVa cVzUNiffbvkKSqG4lD3Tlihwn9/MXmTwEFqC05vvU1aorjz6lgRO64MeqeIeWrXsBk3P WFhObRCRFktmRBK4TNQVuda1KNMMTzkaob6yeKhvvFb9h9CGRKn3EdANGffnLYo4LS0V 9UXYFjhqknqAv3NbdRJtCPt1z/YIvzRJxiEl1KNeHBlQh/DUnllNt18pU0YntsRdJJja lxE/SGeKyL38w9ihlZfbC5r7Dp1h0TCMWrBftDZyMPWDaU7dR/KScXzOcfO2ls2nDPHa XxmQ== X-Gm-Message-State: AD7BkJLKRbhDZm+XvpyamvfzZ0zShR3JRbx+V35dFpqhyMfevtStAz0OLVnXxiv79/VXKQ== X-Received: by 10.98.87.211 with SMTP id i80mr364441pfj.63.1456475655918; Fri, 26 Feb 2016 00:34:15 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 82sm17388218pfn.89.2016.02.26.00.34.12 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 26 Feb 2016 00:34:15 -0800 (PST) From: Yao Qi To: Antoine Tremblay Cc: , Subject: Re: [PATCH v6] Enable tracing of pseudo-registers on ARM References: <861t81cc2c.fsf@gmail.com> <1456414378-1918-1-git-send-email-antoine.tremblay@ericsson.com> Date: Fri, 26 Feb 2016 08:34:00 -0000 In-Reply-To: <1456414378-1918-1-git-send-email-antoine.tremblay@ericsson.com> (Antoine Tremblay's message of "Thu, 25 Feb 2016 10:32:58 -0500") Message-ID: <86wpprc1ky.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00835.txt.bz2 Antoine Tremblay writes: > @@ -20,7 +20,11 @@ > * registers on x86_64. > */ >=20=20 The comments above should be updated as well. > +#if (defined __x86_64__) > #include > +#elif (defined __arm__ || defined __thumb2__ || defined __thumb__) __arm__ is defined even in thumb mode, so only "defined __arm__" is enough. > +#include Why do you include arm_neon.h? I don't see anything NEON specific is used. > +#endif >=20=20 > void > dummy (void) > @@ -37,6 +41,7 @@ main (void) > { > /* Strictly speaking, it should be ymm15 (xmm15 is 128-bit), but gcc o= lder > than 4.9 doesn't recognize "ymm15" as a valid register name. */ > +#if (defined __x86_64__) > register __v8si a asm("xmm15") =3D { > 0x12340001, > 0x12340002, > @@ -48,6 +53,13 @@ main (void) > 0x12340008, > }; > asm volatile ("traceme: call dummy" : : "x" (a)); > +#elif (defined __arm__ || defined __thumb2__ || defined __thumb__) Only "defined __arm__" is needed. > + register uint32_t a asm("s5") =3D { > + 0x2 > + }; I'd like to write an inline asm to set s5 a value and the value can be show= n as an integer so that the test is more reliable (current test tests float "2.80259693e-45"). > + asm volatile ("traceme: bl dummy" : : "x" (a)); > +#endif > + > end (); > return 0; > } > diff --git a/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp b/gdb/tests= uite/gdb.trace/tracefile-pseudo-reg.exp > index 4c52c64..12a2740 100644 > --- a/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp > +++ b/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp > @@ -12,8 +12,8 @@ > # You should have received a copy of the GNU General Public License > # along with this program. If not, see . >=20=20 > -if { ! [is_amd64_regs_target] } { > - verbose "Skipping tfile AVX test (target is not x86_64)." > +if { ! [is_amd64_regs_target] && ! [istarget "arm*-*-*"] } { > + verbose "Skipping tracefile pseudo register tests, target is not sup= ported." > return > } >=20=20 > @@ -21,8 +21,14 @@ load_lib "trace-support.exp" >=20=20 > standard_testfile >=20=20 > +if { [is_amd64_regs_target] } { > + set add_flags "-mavx" > +} elseif { [istarget "arm*-*-*"] } { > + set add_flags "-mfpu=3Dneon" Don't have to pass -mfpu=3Dneon, because the case is also valid for vfp. > +} > + > if {[prepare_for_testing $testfile.exp $testfile $srcfile \ > - [list debug additional_flags=3D-mavx]]} { > + [list debug additional_flags=3D$add_flags]]} { > return -1 > } >=20=20 > @@ -36,20 +42,31 @@ if ![gdb_target_supports_trace] { > return -1 > } >=20=20 > -gdb_test_multiple "print \$ymm15" "check for AVX support" { > +if { [is_amd64_regs_target] } { > + set reg "\$ymm15" > + set reg_message "check for AVX support" > +} elseif { [istarget "arm*-*-*"] } { > + set reg "\$s5" > + set reg_message "check for Neon support" $s5 exists on the processors which support NEON or VFP, so the $reg_message isn't accurate. We can change reg_message to "check register $reg". --=20 Yao (=E9=BD=90=E5=B0=A7)