From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8651 invoked by alias); 29 Jul 2011 16:01:52 -0000 Received: (qmail 8618 invoked by uid 22791); 29 Jul 2011 16:01:52 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_ZJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 16:01:39 +0000 From: "hjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49833] [x32] PIC doesn't work X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 29 Jul 2011 16:01:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg02569.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49833 --- Comment #22 from hjl at gcc dot gnu.org 2011-07-29 16:00:48 UTC --- Author: hjl Date: Fri Jul 29 16:00:41 2011 New Revision: 176932 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176932 Log: Rewrite x86 lea support for x32. 2011-07-26 Uros Bizjak H.J. Lu PR target/47381 PR target/49832 PR target/49833 * config/i386/i386.md (i): Change SImode attribute to "e". (g): Change SImode attribute to "rme". (di): Change SImode attribute to "nF". (general_operand): Change SImode attribute to x86_64_general_operand. (general_szext_operand): Change SImode attribute to x86_64_szext_general_operand. (immediate_operand): Change SImode attribute to x86_64_immediate_operand. (nonmemory_operand): Change SImode attribute to x86_64_nonmemory_operand. (*movdi_internal_rex64): Remove mode from pic_32bit_operand check. (*movsi_internal): Ditto. Use "e" constraint in alternative 2. (*lea_1): Use SWI48 mode iterator. (*lea_1_zext): New insn pattern. (testsi_ccno_1): Use x86_64_nonmemory_operand predicate for operand 2. (*bt): Ditto. (*add1): Use x86_64_general_operand predicate for operand 2. Update operand constraints. (addsi_1_zext): Ditto. (*add2): Ditto. (*addsi_3_zext): Ditto. (*subsi_1_zext): Ditto. (*subsi_2_zext): Ditto. (*subsi_3_zext): Ditto. (*addsi3_carry_zext): Ditto. (*si3_zext_cc_overflow): Ditto. (*mulsi3_1_zext): Ditto. (*andsi_1): Ditto. (*andsi_1_zext): Ditto. (*andsi_2_zext): Ditto. (*si_1_zext): Ditto. (*si_2_zext): Ditto. (*test_1): Use predicate for operand 1. (*and_2): Ditto. (movcc): Use predicate for operands 1 and 2. (add->lea splitter): Check operand modes in insn constraint. Extend operands less than SImode wide to SImode. (add->lea zext splitter): Do not extend input operands to DImode. (*lea_general_1): Handle only QImode and HImode operands. (*lea_general_2): Ditto. (*lea_general_3): Ditto. (*lea_general_1_zext): Remove. (*lea_general_2_zext): Ditto. (*lea_general_3_zext): Ditto. (*lea_general_4): Check operand modes in insn constraint. Extend operands less than SImode wide to SImode. (ashift->lea splitter): Ditto. * config/i386/i386.c (ix86_print_operand_address): Print address registers with 'q' modifier on 64bit targets. * config/i386/predicates.md (pic_32bit_opreand): Define as special predicate. Reject non-SI and non-DI modes. Modified: branches/x32/gcc/ChangeLog.x32 branches/x32/gcc/config/i386/i386.c branches/x32/gcc/config/i386/i386.md branches/x32/gcc/config/i386/predicates.md