From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21310 invoked by alias); 23 Apr 2015 21:26:41 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 21289 invoked by uid 89); 23 Apr 2015 21:26:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Apr 2015 21:26:39 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id C2F2ED25E9A87; Thu, 23 Apr 2015 22:26:32 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 23 Apr 2015 22:26:36 +0100 Received: from LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9]) by LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9%17]) with mapi id 14.03.0210.002; Thu, 23 Apr 2015 22:26:35 +0100 From: Matthew Fortune To: Richard Sandiford CC: "binutils@sourceware.org" Subject: RE: [PATCH, MIPS] Improve warning messages for la/dla Date: Thu, 23 Apr 2015 21:26:00 -0000 Message-ID: <6D39441BF12EF246A7ABCE6654B023532103E4E5@LEMAIL01.le.imgtec.org> References: <6D39441BF12EF246A7ABCE6654B023532103DF06@LEMAIL01.le.imgtec.org> <87pp6uty3e.fsf@googlemail.com> <6D39441BF12EF246A7ABCE6654B023532103E051@LEMAIL01.le.imgtec.org> In-Reply-To: <6D39441BF12EF246A7ABCE6654B023532103E051@LEMAIL01.le.imgtec.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00365.txt.bz2 > > > gas/ > > > > > > * config/tc-mips.c (macro): State the recommended way of creating > > > 32-bit or 64-bit addresses. > > > > OK, thanks. Guess this means we don't have any testcases for the > > warning. :-) >=20 > Indeed, I was surprised too. I'll add one for each though given I had > the same thought as you. I committed this (inc test cases).=20 Thanks, Matthew gas/ * config/tc-mips.c (macro): State the recommended way of creating 32-bit or 64-bit addresses. gas/testsuite/ * gas/mips/dla-warn.l: New file. * gas/mips/dla-warn.s: New file. * gas/mips/la-warn.l: New file. * gas/mips/la-warn.s: New file. * gas/mips/mips.exp: Run new tests. --- gas/ChangeLog | 5 +++++ gas/config/tc-mips.c | 6 ++++-- gas/testsuite/ChangeLog | 8 ++++++++ gas/testsuite/gas/mips/dla-warn.l | 2 ++ gas/testsuite/gas/mips/dla-warn.s | 1 + gas/testsuite/gas/mips/la-warn.l | 2 ++ gas/testsuite/gas/mips/la-warn.s | 1 + gas/testsuite/gas/mips/mips.exp | 4 ++++ 8 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/mips/dla-warn.l create mode 100644 gas/testsuite/gas/mips/dla-warn.s create mode 100644 gas/testsuite/gas/mips/la-warn.l create mode 100644 gas/testsuite/gas/mips/la-warn.s diff --git a/gas/ChangeLog b/gas/ChangeLog index d2698bc..4bdbe5d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-04-23 Matthew Fortune + + * config/tc-mips.c (macro): State the recommended way of creating + 32-bit or 64-bit addresses. + 2015-04-23 Jan Beulich =20 * config/tc-i386.c (match_mem_size): Also allow no size diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index e61bb4d..40e38f8 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -10331,10 +10331,12 @@ macro (struct mips_cl_insn *ip, char *str) =20 breg =3D op[2]; if (dbl && GPR_SIZE =3D=3D 32) - as_warn (_("dla used to load 32-bit register")); + as_warn (_("dla used to load 32-bit register; recommend using la " + "instead")); =20 if (!dbl && HAVE_64BIT_OBJECTS) - as_warn (_("la used to load 64-bit address")); + as_warn (_("la used to load 64-bit address; recommend using dla " + "instead")); =20 if (small_offset_p (0, align, 16)) { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 493edba..c28a6a2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2015-04-23 Matthew Fortune =20 + * gas/mips/dla-warn.l: New file. + * gas/mips/dla-warn.s: New file. + * gas/mips/la-warn.l: New file. + * gas/mips/la-warn.s: New file. + * gas/mips/mips.exp: Run new tests. + +2015-04-23 Matthew Fortune + * gas/mips/mips.exp: Require o32 for r6-branch-constraints. =20 2015-04-23 Jan Beulich diff --git a/gas/testsuite/gas/mips/dla-warn.l b/gas/testsuite/gas/mips/dla= -warn.l new file mode 100644 index 0000000..4a25ea3 --- /dev/null +++ b/gas/testsuite/gas/mips/dla-warn.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*:1: Warning: dla used to load 32-bit register; recommend using la instead diff --git a/gas/testsuite/gas/mips/dla-warn.s b/gas/testsuite/gas/mips/dla= -warn.s new file mode 100644 index 0000000..a2c60c1 --- /dev/null +++ b/gas/testsuite/gas/mips/dla-warn.s @@ -0,0 +1 @@ + dla $2, foo diff --git a/gas/testsuite/gas/mips/la-warn.l b/gas/testsuite/gas/mips/la-w= arn.l new file mode 100644 index 0000000..05eaf8a --- /dev/null +++ b/gas/testsuite/gas/mips/la-warn.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*:1: Warning: la used to load 64-bit address; recommend using dla instead diff --git a/gas/testsuite/gas/mips/la-warn.s b/gas/testsuite/gas/mips/la-w= arn.s new file mode 100644 index 0000000..894dba5 --- /dev/null +++ b/gas/testsuite/gas/mips/la-warn.s @@ -0,0 +1 @@ + la $2, foo diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.= exp index cdb66fc..c3c3364 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1223,8 +1223,12 @@ if { [istarget mips*-*-vxworks*] } { run_list_test "ase-errors-4" "-mabi=3Do64 -march=3Dmips3" "ASE errors = (4)" =20 run_dump_test_arches "la-reloc" [mips_arch_list_matching mips1] + run_list_test "dla-warn" "-mabi=3D32 -march=3Dmips3" \ + "DLA with 32-bit addresses" if { $has_newabi } { run_dump_test_arches "dla-reloc" [mips_arch_list_matching mips3] + run_list_test "la-warn" "-mabi=3D64 -march=3Dmips3" \ + "LA with 64-bit addresses" } =20 # Start with MIPS II to avoid load delay nops. --=20 2.2.1