diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-09 17:10:03 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-09 17:10:03 +0000 |
commit | 0b8fc818b5441eab63489374a3da6b31d648bf58 (patch) | |
tree | 8d0ebcc73d5b00e238ee100be97600475908b083 /gcc/ada/g-alvety.ads | |
parent | 84301fedaf2400699bafe91b8c405ad5db683b91 (diff) | |
download | gcc-0b8fc818b5441eab63489374a3da6b31d648bf58.tar.gz |
2005-12-05 Doug Rupp <rupp@adacore.com>
* mlib-tgt-vms-ia64.adb, mlib-tgt-vms-alpha.adb (Is_Interface): Change
Ada bind file prefix on VMS from b$ to b__.
(Build_Dynamic_Library): Change Init file suffix on VMS from $init to
__init.
* prj-nmsc.adb: Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
(Object_Suffix): Initialize with target object suffix.
(Get_Unit): Change Ada bind file prefix on VMS from b$ to b__.
* butil.adb: Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
* clean.adb: Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
(Object_Suffix): Initialize with call to Get_Target_Object_Suffix.
({declaraction},Delete_Binder_Generated_Files,{initialization}): Change
Ada bind file prefix on VMS from b$ to b__.
* gnatlink.adb (Process_Args): Call Add_Src_Search_Dir for -I in
--GCC so that Get_Target_Parameters can find system.ads.
(Gnatlink): Call Get_Target_Parameters in mainline.
Initialize standard packages for Targparm.
Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target.
(Process_Args): Also Check for object files with target object
extension.
(Make_Binder_File_Names): Create with target object extension.
(Make_Binder_File_Names): Change Ada bind file prefix on VMS from b$
to b__.
* mlib-prj.adb: Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
({declaration},Build_Library,Check_Library): Change Ada bind file
prefix on VMS from b$ to b__.
* osint-b.adb: Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
(Create_Binder_Output): Change Ada bind file prefix on VMS from b$ to
b__.
* targext.c: New file.
* Makefile.in: add support for vxworks653 builds
(../../vxaddr2line): gnatlink with targext.o.
(TOOLS_LIBS): Move targext.o to precede libgnat.
(init.o, initialize.o): Minor clean up in dependencies.
(GNATLINK_OBJS): Add targparm.o, snames.o
Add rules fo building targext.o and linking it explicitly with all
tools.
Also add targext.o to gnatlib.
* Make-lang.in: Add rules for building targext.o and linking it in
with gnat1 and gnatbind.
Add entry for exp_sel.o.
* osint.adb Change some Hostparm.OpenVMS checks to
Targparm.OpenVMS_On_Target.
(Object_File_Name): Use target object suffix.
* osint.ads (Object_Suffix): Remove, no longer used.
(Target_Object_Suffix): Initialize with target object suffix.
* rident.ads: Add special exception to license.
* targparm.adb (Get_Target_Parameters): Set the value of
Multi_Unit_Index_Character after OpenVMS_On_Target gets its definitive
value.
(Get_Target_Parameters): Set OpenVMS_On_Target if openvms.
* targparm.ads: Add special exception to license.
* g-os_lib.ads, g-os_lib.adb (Get_Target_Debuggable_Suffix): New
function.
(Copy_File): Make sure from file is closed if error on to file
(Get_Target_Executable_Suffix, Get_Target_Object_Suffix): New functions.
* make.adb (Object_Suffix): Intialize with Get_Target_Object_Suffix.
(Executable_Suffix): Intialize with Get_Target_Executable_Suffix.
* osint-c.adb (Set_Output_Object_File_Name): Initialize extension with
target object suffix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-alvety.ads')
-rw-r--r-- | gcc/ada/g-alvety.ads | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/gcc/ada/g-alvety.ads b/gcc/ada/g-alvety.ads new file mode 100644 index 00000000000..03b637e0da2 --- /dev/null +++ b/gcc/ada/g-alvety.ads @@ -0,0 +1,152 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . V E C T O R _ T Y P E S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2004-2005, 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- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit exposes the various vector types part of the Ada binding to +-- Altivec facilities. + +with GNAT.Altivec.Low_Level_Vectors; + +package GNAT.Altivec.Vector_Types is + + use GNAT.Altivec.Low_Level_Vectors; + + --------------------------------------------------- + -- Vector type declarations [PIM-2.1 Data Types] -- + --------------------------------------------------- + + -- Except for assignments and pointer creation/dereference, operations + -- on vectors are only performed via subprograms. The vector types are + -- then private, and non-limited since assignments are allowed. + + -- The Hard/Soft binding type-structure differentiation is achieved in + -- Low_Level_Vectors. Each version only exposes private vector types, that + -- we just sub-type here. This is fine from the design standpoint and + -- reduces the amount of explicit conversion required in various places + -- internally. + + subtype vector_unsigned_char is Low_Level_Vectors.LL_VUC; + subtype vector_signed_char is Low_Level_Vectors.LL_VSC; + subtype vector_bool_char is Low_Level_Vectors.LL_VBC; + + subtype vector_unsigned_short is Low_Level_Vectors.LL_VUS; + subtype vector_signed_short is Low_Level_Vectors.LL_VSS; + subtype vector_bool_short is Low_Level_Vectors.LL_VBS; + + subtype vector_unsigned_int is Low_Level_Vectors.LL_VUI; + subtype vector_signed_int is Low_Level_Vectors.LL_VSI; + subtype vector_bool_int is Low_Level_Vectors.LL_VBI; + + subtype vector_float is Low_Level_Vectors.LL_VF; + subtype vector_pixel is Low_Level_Vectors.LL_VP; + + -- [PIM-2.1] shows groups of declarations with exact same component types, + -- e.g. vector unsigned short together with vector unsigned short int. It + -- so appears tempting to define subtypes for those matches here. + -- + -- [PIM-2.1] does not qualify items in those groups as "the same types", + -- though, and [PIM-2.4.2 Assignments] reads: "if either the left hand + -- side or the right hand side of an expression has a vector type, then + -- both sides of the expression must be of the same vector type". + -- + -- Not so clear what is exactly right, then. We go with subtypes for now + -- and can adjust later if need be. + + subtype vector_unsigned_short_int is vector_unsigned_short; + subtype vector_signed_short_int is vector_signed_short; + + subtype vector_char is vector_signed_char; + subtype vector_short is vector_signed_short; + subtype vector_int is vector_signed_int; + + -------------------------------- + -- Corresponding access types -- + -------------------------------- + + type vector_unsigned_char_ptr is access all vector_unsigned_char; + type vector_signed_char_ptr is access all vector_signed_char; + type vector_bool_char_ptr is access all vector_bool_char; + + type vector_unsigned_short_ptr is access all vector_unsigned_short; + type vector_signed_short_ptr is access all vector_signed_short; + type vector_bool_short_ptr is access all vector_bool_short; + + type vector_unsigned_int_ptr is access all vector_unsigned_int; + type vector_signed_int_ptr is access all vector_signed_int; + type vector_bool_int_ptr is access all vector_bool_int; + + type vector_float_ptr is access all vector_float; + type vector_pixel_ptr is access all vector_pixel; + + -------------------------------------------------------------------- + -- Additional access types, for the sake of some argument passing -- + -------------------------------------------------------------------- + + -- ... because some of the operations expect pointers to possibly + -- constant objects. + + type const_vector_bool_char_ptr is access constant vector_bool_char; + type const_vector_signed_char_ptr is access constant vector_signed_char; + type const_vector_unsigned_char_ptr is access constant vector_unsigned_char; + + type const_vector_bool_short_ptr is access constant vector_bool_short; + type const_vector_signed_short_ptr is access constant vector_signed_short; + type const_vector_unsigned_short_ptr is access + constant vector_unsigned_short; + + type const_vector_bool_int_ptr is access constant vector_bool_int; + type const_vector_signed_int_ptr is access constant vector_signed_int; + type const_vector_unsigned_int_ptr is access constant vector_unsigned_int; + + type const_vector_float_ptr is access constant vector_float; + type const_vector_pixel_ptr is access constant vector_pixel; + + ---------------------- + -- Useful shortcuts -- + ---------------------- + + subtype VUC is vector_unsigned_char; + subtype VSC is vector_signed_char; + subtype VBC is vector_bool_char; + + subtype VUS is vector_unsigned_short; + subtype VSS is vector_signed_short; + subtype VBS is vector_bool_short; + + subtype VUI is vector_unsigned_int; + subtype VSI is vector_signed_int; + subtype VBI is vector_bool_int; + + subtype VP is vector_pixel; + subtype VF is vector_float; + +end GNAT.Altivec.Vector_Types; |