From patchwork Sun Nov 21 17:35:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 72451 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 1BF57B714C for ; Mon, 22 Nov 2010 05:53:20 +1100 (EST) Received: (qmail 31567 invoked by alias); 21 Nov 2010 18:53:17 -0000 Received: (qmail 31558 invoked by uid 22791); 21 Nov 2010 18:53:16 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_BG, TW_IB, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 21 Nov 2010 18:53:11 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oALIpcgI015273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 21 Nov 2010 13:51:38 -0500 Received: from stone.twiddle.home ([10.3.113.10]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oALHZbrB022995; Sun, 21 Nov 2010 12:35:37 -0500 Message-ID: <4CE9586E.8080007@redhat.com> Date: Sun, 21 Nov 2010 09:35:42 -0800 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Thunderbird/3.1.6 MIME-Version: 1.0 To: GCC Patches CC: sje@cup.hp.com Subject: [ia64] fix libgfortran build X-IsSubscribed: yes 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 With the addition of the libquad bits, we exposed a bug in the __float128 support in the ia64 backend. We use the wrong mode for some builtins. Tested on ia64-linux. Committed. r~ * config/ia64/ia64.c (ia64_expand_builtin): Use the correct mode for infq/huge_valq. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index a657d4e..06258cb 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -10236,16 +10236,17 @@ ia64_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, case IA64_BUILTIN_INFQ: case IA64_BUILTIN_HUGE_VALQ: { + enum machine_mode target_mode = TYPE_MODE (TREE_TYPE (exp)); REAL_VALUE_TYPE inf; rtx tmp; real_inf (&inf); - tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, mode); + tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, target_mode); - tmp = validize_mem (force_const_mem (mode, tmp)); + tmp = validize_mem (force_const_mem (target_mode, tmp)); if (target == 0) - target = gen_reg_rtx (mode); + target = gen_reg_rtx (target_mode); emit_move_insn (target, tmp); return target;