From patchwork Thu Apr 25 10:20:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 239458 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7595B2C025A for ; Thu, 25 Apr 2013 20:20:25 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=EcJRVuNItFBzX2XpiJef4Os+EyBb2TcgnTsF1bA2JAXa5/qxFk VJp1cjKwqGcG7JgDirKepWlrgPf6sbrOZgwksGMAP4LSZMpM15e06vyEwr7dKAuW aahsdnJDPj1owD6LdBMxZlHUwNRwpw5SccCMDuaZAR5Neu3SjQKrJJPks= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=+SIwIhTkVTxABx/UDKV/jOqgMvY=; b=L9mvjDLuNdN76JXr52gA lsHv79ONL8GghtujH7wC7Ufs7OcpAEwyihJM1bXitc4gw94E0e6iFCfbzzPQv3CZ 4JVRqnZ1eUuiAJLzdqxzoz/AaANhJo37BzA4wuKjXtMX6IB0TFYNgBNgGiyirkDH EqvR6CjUwDR+qI01ETs8k+Y= Received: (qmail 14839 invoked by alias); 25 Apr 2013 10:20:18 -0000 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 Received: (qmail 14828 invoked by uid 89); 25 Apr 2013 10:20:18 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Apr 2013 10:20:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 16B5F2E890; Thu, 25 Apr 2013 06:20:16 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HZobcMpvKuRh; Thu, 25 Apr 2013 06:20:16 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id E71B22E7DC; Thu, 25 Apr 2013 06:20:15 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id E63203FF09; Thu, 25 Apr 2013 06:20:15 -0400 (EDT) Date: Thu, 25 Apr 2013 06:20:15 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: "Douglas B. Rupp" Subject: [Ada] VAX Float runtime via Targparm Message-ID: <20130425102015.GA3273@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Found: No Allow building a vaxfloat runtime by setting a target system.ads boolean, vice having a build directory gnat.adc configuration pragma and the attendant and repeated full runtime recompilation with gnatmake. Tested on x86_64-pc-linux-gnu, committed on trunk 2013-04-25 Doug Rupp * targparm.adb (VXF{_Str}): New tag for vaxfloat. (Get_Target_Parameters): Handle VXF tag. * targparm.ads (VAX_Float_On_Target): New boolean. * system-vms-ia64.ads (VAX_Float): New boolean. * frontend.adb (Frontend): Handle VAX float boolean. Index: frontend.adb =================================================================== --- frontend.adb (revision 198221) +++ frontend.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -56,6 +56,7 @@ with Sem_SCIL; with Sem_Elab; use Sem_Elab; with Sem_Prag; use Sem_Prag; +with Sem_VFpt; use Sem_VFpt; with Sem_Warn; use Sem_Warn; with Sinfo; use Sinfo; with Sinput; use Sinput; @@ -181,6 +182,18 @@ Config_Pragmas := Empty_List; end if; + -- Check for VAX Float + + if Targparm.VAX_Float_On_Target then + -- pragma Float_Representation (VAX_Float); + Opt.Float_Format := 'V'; + + -- pragma Long_Float (G_Float); + Opt.Float_Format_Long := 'G'; + + Set_Standard_Fpt_Formats; + end if; + -- Now deal with specified config pragmas files if there are any if Opt.Config_File_Names /= null then Index: targparm.adb =================================================================== --- targparm.adb (revision 198221) +++ targparm.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -68,6 +68,7 @@ SSL, -- Suppress_Standard_Library UAM, -- Use_Ada_Main_Program_Name VMS, -- OpenVMS + VXF, -- VAX Float ZCD); -- ZCX_By_Default Targparm_Flags : array (Targparm_Tags) of Boolean := (others => False); @@ -105,6 +106,7 @@ SSL_Str : aliased constant Source_Buffer := "Suppress_Standard_Library"; UAM_Str : aliased constant Source_Buffer := "Use_Ada_Main_Program_Name"; VMS_Str : aliased constant Source_Buffer := "OpenVMS"; + VXF_Str : aliased constant Source_Buffer := "VAX_Float"; ZCD_Str : aliased constant Source_Buffer := "ZCX_By_Default"; -- The following defines a set of pointers to the above strings, @@ -142,6 +144,7 @@ SSL_Str'Access, UAM_Str'Access, VMS_Str'Access, + VXF_Str'Access, ZCD_Str'Access); ----------------------- @@ -600,6 +603,7 @@ when SNZ => Signed_Zeros_On_Target := Result; when UAM => Use_Ada_Main_Program_Name_On_Target := Result; when VMS => OpenVMS_On_Target := Result; + when VXF => VAX_Float_On_Target := Result; when ZCD => ZCX_By_Default_On_Target := Result; goto Line_Loop_Continue; Index: targparm.ads =================================================================== --- targparm.ads (revision 198221) +++ targparm.ads (working copy) @@ -206,6 +206,9 @@ OpenVMS_On_Target : Boolean := False; -- Set to True if target is OpenVMS + VAX_Float_On_Target : Boolean := False; + -- Set to True if target float format is VAX Float + RTX_RTSS_Kernel_Module_On_Target : Boolean := False; -- Set to True if target is RTSS module for RTX Index: system-vms-ia64.ads =================================================================== --- system-vms-ia64.ads (revision 198221) +++ system-vms-ia64.ads (working copy) @@ -7,7 +7,7 @@ -- S p e c -- -- (OpenVMS 64bit Itanium GCC_ZCX DEC Threads Version) -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -144,6 +144,7 @@ Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := True; + VAX_Float : constant Boolean := False; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := True;