From patchwork Fri Apr 13 17:14:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 152351 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 B1267B700E for ; Sat, 14 Apr 2012 03:15:30 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1334942132; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=74yHofNERv2KpuXxL5SO gmj43MU=; b=IfzY1gugJOyPvp9baevt8feGGLIQqctkAhf3SdI7HLaYznit+AIq /2FaZwmH+4yG6tXASJjewyRK2jxd3iO2dmpQWLqQJ38zHvdHWFCHzFo/PxtI7B2Z VWxEKxsNc1XyHznJn/XbVKh/YPSKE/4WyVgloWz14Xs9YbqgKyUI5Ow= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-ExtLoop1:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=vbbDf7rk8Ade1+Jk+4pP00rtiBsGAX87PRAz9M5OILu4iO4KzZwk94geN6+R6g yY1YBYtRSQSnfu5vzrAwJMc5azLt+Pl0Ybu3ihYfYnJqI6ghmG2DbJHL8fYMyI5v Na5ZN67e4qZOlohX7t4mu21B6qEqs/XvxgSHBoyV10CzE=; Received: (qmail 8727 invoked by alias); 13 Apr 2012 17:15:16 -0000 Received: (qmail 8698 invoked by uid 22791); 13 Apr 2012 17:15:10 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Apr 2012 17:14:57 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 13 Apr 2012 10:14:57 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 13 Apr 2012 10:14:57 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 0BE9FC18D0; Fri, 13 Apr 2012 10:14:56 -0700 (PDT) Date: Fri, 13 Apr 2012 10:14:56 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: PATCH: Define _ILP32 and __ILP32__ for x32 Message-ID: <20120413171456.GA17593@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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, This patch defines _ILP32 and __ILP32__ for x32 as specified by x32 psABI. OK for trunk and 4.7 branch? Thanks. H.J. --- 2012-04-13 H.J. Lu * config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and __ILP32__ for x32. diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index 8adb3b4..49fd4d9 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -383,6 +383,11 @@ ix86_target_macros (void) cpp_define (parse_in, "__amd64__"); cpp_define (parse_in, "__x86_64"); cpp_define (parse_in, "__x86_64__"); + if (TARGET_X32) + { + cpp_define (parse_in, "_ILP32"); + cpp_define (parse_in, "__ILP32__"); + } } else {