From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12216 invoked by alias); 15 Dec 2004 14:39:48 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 11848 invoked from network); 15 Dec 2004 14:39:39 -0000 Received: from unknown (HELO lon-del-01.spheriq.net) (195.46.50.97) by sourceware.org with SMTP; 15 Dec 2004 14:39:39 -0000 Received: from lon-inc-06.spheriq.net ([195.46.50.70]) by lon-del-01.spheriq.net with ESMTP id iBFEdbYP020766 for ; Wed, 15 Dec 2004 14:39:37 GMT Received: from lon-out-02.spheriq.net (lon-out-02.spheriq.net [195.46.50.130]) by lon-inc-06.spheriq.net with ESMTP id iBFEdbrO015541 for ; Wed, 15 Dec 2004 14:39:37 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-02.spheriq.net with ESMTP id iBFEda33004246 for ; Wed, 15 Dec 2004 14:39:36 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id iBFEdY23001498 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 15 Dec 2004 14:39:36 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 55C9CDBEA for ; Wed, 15 Dec 2004 14:35:37 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 31A7047376; Wed, 15 Dec 2004 14:35:34 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CE82875994 for ; Wed, 15 Dec 2004 14:35:33 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4ED4E4737C for ; Wed, 15 Dec 2004 14:35:33 +0000 (GMT) Received: from st.com (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.4.4-GR) with ESMTP id AQD02441 (AUTH "andrew stubbs"); Wed, 15 Dec 2004 14:35:04 GMT Message-ID: <41C04BDE.B40032D3@st.com> Date: Wed, 15 Dec 2004 14:39:00 -0000 From: Andrew STUBBS Organization: STMicroelectronics MIME-Version: 1.0 To: binutils Subject: [SH64 Patch] Add diagnostic messages to gas Content-Type: multipart/mixed; boundary="------------2751CDF9249A58AD635ECDB2" X-O-Virus-Status: No X-O-URL-Status: Not Scanned X-O-CSpam-Status: Not Scanned X-O-Spam-Status: Not scanned X-O-Image-Status: Not Scanned X-O-Att-Status: No X-SpheriQ-Ver: 1.8.3 X-SW-Source: 2004-12/txt/msg00165.txt.bz2 This is a multi-part message in MIME format. --------------2751CDF9249A58AD635ECDB2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 359 SHmedia PT instructions are not permitted to have expressions as arguments. This is currently tested, but instead of giving an error message the bad code is just ignored. The attached patch adds a simple error message. This should be enough to bring the problem to the user's attention. -- Andrew Stubbs andrew.stubbs@st.com (aka. andrew.stubbs@superh.com) --------------2751CDF9249A58AD635ECDB2 Content-Type: text/plain; charset=us-ascii; name="sh64-diagnostic.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sh64-diagnostic.patch" Content-length: 1023 2004-12-14 Andrew Stubbs * config/tc-sh64.c (shmedia_build_Mytes): Emit an error message rather than just ignoring bad code. --- src/gas/config/tc-sh64.c 2004-01-14 21:07:45.000000000 +0000 +++ src/gas/config/tc-sh64.c 2004-12-15 14:17:43.000000000 +0000 @@ -2672,7 +2711,10 @@ shmedia_build_Mytes (shmedia_opcode_info /* Don't allow complex expressions here. */ if (opjp->immediate.X_op_symbol != NULL) - return 0; + { + as_bad(_("invalid operand: expression in PT target")); + return 0; + } if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL) init = max = min = SH64PCRELPLT; @@ -2709,7 +2751,10 @@ shmedia_build_Mytes (shmedia_opcode_info /* Don't allow complex expressions here. */ if (opjp->immediate.X_op_symbol != NULL) - return 0; + { + as_bad(_("invalid operand: expression in PT target")); + return 0; + } if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL) init = max = min = SH64PCRELPLT; --------------2751CDF9249A58AD635ECDB2--