From patchwork Wed Dec 21 10:49:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 132615 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 6DF3EB7110 for ; Wed, 21 Dec 2011 21:50:09 +1100 (EST) Received: (qmail 28955 invoked by alias); 21 Dec 2011 10:50:04 -0000 Received: (qmail 28944 invoked by uid 22791); 21 Dec 2011 10:50:03 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Dec 2011 10:49:49 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 387AE290011; Wed, 21 Dec 2011 11:49:49 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z3uBd211ocwe; Wed, 21 Dec 2011 11:49:49 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 259D2290001; Wed, 21 Dec 2011 11:49:49 +0100 (CET) From: Tristan Gingold Subject: [patch]: ia64 - allow VMS to redefine TARGET_PROMOTE_FUNCTION_MODE Date: Wed, 21 Dec 2011 11:49:47 +0100 Message-Id: Cc: Steve Ellcey To: GCC Patches Mime-Version: 1.0 (Apple Message framework v1251.1) 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 Hi, a follow-up of the previous patch. Maybe they should be merged. VMS/ia64 doesn't closely follow the standard ELF ABI, and keep some aspects of the Alpha ABI for backward compatibility. With the previous patch, this patch fixes a convention call ABI issue, as well as an ICE that appears while using 32bit pointers. Ok for trunk ? Tristan. 2011-12-21 Tristan Gingold * config/ia64/ia64.c (TARGET_PROMOTE_FUNCTION_MODE): Move to... * config/ia64/ia64.h (TARGET_PROMOTE_FUNCTION_MODE): ... Here. * config/ia64/vms.h (TARGET_PROMOTE_FUNCTION_MODE): Override. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 8fe9b51..d74eeb6 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -541,9 +541,6 @@ static const struct attribute_spec ia64_attribute_table[] = #define TARGET_ASM_OUTPUT_DWARF_DTPREL ia64_output_dwarf_dtprel #endif -#undef TARGET_PROMOTE_FUNCTION_MODE -#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode - /* ??? Investigate. */ #if 0 #undef TARGET_PROMOTE_PROTOTYPES diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index a3ccd6f..aaa2f26 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -157,6 +157,8 @@ do \ } \ while (0) +#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode + #define PARM_BOUNDARY 64 /* Define this macro if you wish to preserve a certain alignment for the stack diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h index fada50c..f34ee78 100644 --- a/gcc/config/ia64/vms.h +++ b/gcc/config/ia64/vms.h @@ -154,3 +154,6 @@ STATIC func_ptr __CTOR_LIST__[1] \ (UNSIGNEDP) = 0; \ (MODE) = DImode; \ } + +#undef TARGET_PROMOTE_FUNCTION_MODE +#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote