From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3854 invoked by alias); 28 Aug 2015 13:01:34 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 3831 invoked by uid 89); 28 Aug 2015 13:01:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS 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; Fri, 28 Aug 2015 13:01:32 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 1490BEAD50F40 for ; Fri, 28 Aug 2015 14:01:28 +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; Fri, 28 Aug 2015 14:01:30 +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; Fri, 28 Aug 2015 14:01:30 +0100 From: Andrew Bennett To: "libffi-discuss@sourceware.org" Subject: [PATCH] MIPS: Do not force the n32.S file to be assembled as MIPS4 Date: Fri, 28 Aug 2015 13:01:00 -0000 Message-ID: <0DA23CC379F5F945ACB41CF394B982772111344D@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/txt/msg00083.txt.bz2 Hi, The n32.S file in the MIPS backend currently is forced to be compiled as MI= PS4. This could lead to the wrong instruction encodings being used when assembli= ng for newer MIPS architectures. This patch only forces the .set mips4 constr= aint if the MIPS architecture provided by the compiler is older than MIPS4. The patch and ChangeLog are below. Regards, Andrew * src/mips/n32.S: Only force the file to be assembled as MIPS4 if the architecture provided by the compiler is older than MIPS4. diff --git a/src/mips/n32.S b/src/mips/n32.S index c6985d3..512063a 100644 --- a/src/mips/n32.S +++ b/src/mips/n32.S @@ -43,7 +43,9 @@ #ifdef __GNUC__ .abicalls #endif +#if __mips < 4 .set mips4 +#endif .text .align 2 .globl ffi_call_N32