From patchwork Mon May 12 23:36:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 348147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 432F5140096 for ; Tue, 13 May 2014 09:37:34 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=sCpcZPJOm3bMoMkS8OP9R513+1T9g+PsxO3j/YQF8vG 8EQVyGPVjwXkxe/K5Uf4Src3HV9McbcvYP4FviVhhJqjyEcu/+oDzBmvybAxmP0I H17O6zOI+pYXQg6rTNWy6zAkz3/G57nzfDbyWkDSa5F1m83FTue0aifclhiLs2Pk = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=EAU4K1T+EN8dcpVbklCYN8d3CZA=; b=VaWyZEsNQEaHlbHJQ XRlwAAOXJPbI68ahuMmh7EeV+JjRqzUeI15lvLlP9TZZRJQDz11cb/FdejBPQTR6 7oQscY8RASnUmoOc6uDiItjDOeGjeVke60yry8u02Q0ndKZKd3n/i2mnM8ix4ECJ DsbgwP8bm36SEmzmwC4QENJbAU= Received: (qmail 32152 invoked by alias); 12 May 2014 23:37:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32140 invoked by uid 89); 12 May 2014 23:37:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 May 2014 23:37:26 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wjzmb-0005Mh-G7 from Sandra_Loosemore@mentor.com ; Mon, 12 May 2014 16:37:21 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 May 2014 16:37:17 -0700 Received: from [IPv6:::1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Mon, 12 May 2014 16:37:17 -0700 Message-ID: <53715B19.3070201@codesourcery.com> Date: Mon, 12 May 2014 17:36:57 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: GCC Patches CC: Catherine Moore , Richard Sandiford Subject: [patch, mips] fix JALR test in configure.ac When configuring GCC for mips-linux-gnu, this happens: configure:26145: checking assembler and linker for explicit JALR relocation conftest.s: Assembler messages: conftest.s:2: Internal error! Assertion failure in macro_build at /scratch/sandra/mips-fsf/obj/binutils-src-mainline-0-mips-linux-gnu-i686-pc-linux-gnu/gas/config/tc-mips.c line 7953. Please report this bug. Probably this should be diagnosed as a user error instead of an assert failure on the binutils side, but on the GCC side, the assembly code being used for this configure test is incorrect and it would make the JALR relocation support test fail even if the assembler diagnosed it more nicely. The trouble is that for the o32 ABI (the assembler default), the "ld" instruction being used in the test is really a macro that expands into 2 instructions. This patch fixes it by substituting "lw", which allows the configure test to pass. OK to commit? -Sandra 2014-05-12 Catherine Moore Sandra Loosemore gcc/ * configure.ac: Fix assembly for explicit JALR relocation check. * configure: Regenerate. Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 210340) +++ gcc/configure.ac (working copy) @@ -4206,8 +4206,8 @@ x: fi elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then echo ' .ent x' > conftest.s - echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s - echo ' ld $25,%call16(y)($28)' >> conftest.s + echo 'x: lw $2,%got_disp(y)($3)' >> conftest.s + echo ' lw $25,%call16(y)($28)' >> conftest.s echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s echo '1: jalr $25' >> conftest.s echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s Index: gcc/configure =================================================================== --- gcc/configure (revision 210340) +++ gcc/configure (working copy) @@ -26153,8 +26153,8 @@ $as_echo_n "checking assembler and linke fi elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then echo ' .ent x' > conftest.s - echo 'x: ld $2,%got_disp(y)($3)' >> conftest.s - echo ' ld $25,%call16(y)($28)' >> conftest.s + echo 'x: lw $2,%got_disp(y)($3)' >> conftest.s + echo ' lw $25,%call16(y)($28)' >> conftest.s echo ' .reloc 1f,R_MIPS_JALR,y' >> conftest.s echo '1: jalr $25' >> conftest.s echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s