From patchwork Thu Jul 28 16:38:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 107396 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]) by ozlabs.org (Postfix) with SMTP id CDC7CB6F57 for ; Sat, 30 Jul 2011 00:03:59 +1000 (EST) Received: (qmail 30272 invoked by alias); 29 Jul 2011 14:03:56 -0000 Received: (qmail 30261 invoked by uid 22791); 29 Jul 2011 14:03:54 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gw0-f47.google.com (HELO mail-gw0-f47.google.com) (74.125.83.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 14:03:39 +0000 Received: by gwb11 with SMTP id 11so3065752gwb.20 for ; Fri, 29 Jul 2011 07:03:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.249.6 with SMTP id w6mr113756wfh.413.1311871092913; Thu, 28 Jul 2011 09:38:12 -0700 (PDT) Received: by 10.143.34.2 with HTTP; Thu, 28 Jul 2011 09:38:12 -0700 (PDT) Date: Thu, 28 Jul 2011 18:38:12 +0200 Message-ID: Subject: [PATCH, i386]: Re-define pic_32bit_operand back to define_predicate From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" 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 Hello! With recent developments, there is no need for pic_32bit_operand to be defined as special predicate with explicit mode checks anymore. Implicit mode checks (including VIODmode bypass) of normal predicates work OK now. 2011-07-28 Uros Bizjak * config/i386/predicates.md (pic_32bit_opreand): Do not define as special predicate. Remove explicit mode checks. Tested on x86_64-pc-linux-gnu {,-m32}. There is remote chance this patch breaks x32, so let's alert H.J. Committed to mainline SVN. Uros. Index: predicates.md =================================================================== --- predicates.md (revision 176870) +++ predicates.md (working copy) @@ -366,15 +366,12 @@ ;; Return true when operand is PIC expression that can be computed by lea ;; operation. -(define_special_predicate "pic_32bit_operand" +(define_predicate "pic_32bit_operand" (match_code "const,symbol_ref,label_ref") { - if (GET_MODE (op) != SImode - && GET_MODE (op) != DImode) - return false; - if (!flag_pic) return false; + /* Rule out relocations that translate into 64bit constants. */ if (TARGET_64BIT && GET_CODE (op) == CONST) { @@ -386,6 +383,7 @@ || XINT (op, 1) == UNSPEC_GOT)) return false; } + return symbolic_operand (op, mode); })