Commit 1098e722 by Arnaud Charlet

[multiple changes]

2015-02-20  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb: Minor comment clarification.

2015-02-20  Olivier Hainque  <hainque@adacore.com>

	* g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
	* g-alleve.ads, g-alleva.adb (vcfux): Likewise.
	* g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
	(vec_ctf): Now renamings as well.

From-SVN: r220857
parent b534f49e
2015-02-20 Robert Dewar <dewar@adacore.com> 2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor comment clarification.
2015-02-20 Olivier Hainque <hainque@adacore.com>
* g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
* g-alleve.ads, g-alleva.adb (vcfux): Likewise.
* g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
(vec_ctf): Now renamings as well.
2015-02-20 Robert Dewar <dewar@adacore.com>
* switch-c.adb, bindgen.adb: Minor reformatting. * switch-c.adb, bindgen.adb: Minor reformatting.
2015-02-20 Ed Schonberg <schonberg@adacore.com> 2015-02-20 Ed Schonberg <schonberg@adacore.com>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -54,58 +54,6 @@ package GNAT.Altivec.Low_Level_Interface is ...@@ -54,58 +54,6 @@ package GNAT.Altivec.Low_Level_Interface is
use GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types;
-- vec_ctf --
function vec_ctf_vui_cint_r_vf
(A : vector_unsigned_int;
B : c_int) return vector_float;
pragma Import
(LL_Altivec, vec_ctf_vui_cint_r_vf, "__builtin_altivec_vcfux");
function vec_ctf_vsi_cint_r_vf
(A : vector_signed_int;
B : c_int) return vector_float;
pragma Import
(LL_Altivec, vec_ctf_vsi_cint_r_vf, "__builtin_altivec_vcfsx");
-- vec_vcfsx --
function vec_vcfsx_vsi_cint_r_vf
(A : vector_signed_int;
B : c_int) return vector_float;
pragma Import
(LL_Altivec, vec_vcfsx_vsi_cint_r_vf, "__builtin_altivec_vcfsx");
-- vec_vcfux --
function vec_vcfux_vui_cint_r_vf
(A : vector_unsigned_int;
B : c_int) return vector_float;
pragma Import
(LL_Altivec, vec_vcfux_vui_cint_r_vf, "__builtin_altivec_vcfux");
-- vec_cts --
function vec_cts_vf_cint_r_vsi
(A : vector_float;
B : c_int) return vector_signed_int;
pragma Import
(LL_Altivec, vec_cts_vf_cint_r_vsi, "__builtin_altivec_vctsxs");
-- vec_ctu --
function vec_ctu_vf_cint_r_vui
(A : vector_float;
B : c_int) return vector_unsigned_int;
pragma Import
(LL_Altivec, vec_ctu_vf_cint_r_vui, "__builtin_altivec_vctuxs");
-- vec_dss -- -- vec_dss --
procedure vec_dss_cint procedure vec_dss_cint
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- B o d y -- -- B o d y --
-- (Soft Binding Version) -- -- (Soft Binding Version) --
-- -- -- --
-- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -2524,9 +2524,9 @@ package body GNAT.Altivec.Low_Level_Vectors is ...@@ -2524,9 +2524,9 @@ package body GNAT.Altivec.Low_Level_Vectors is
-- vcfux -- -- vcfux --
----------- -----------
function vcfux (A : LL_VSI; B : c_int) return LL_VF is function vcfux (A : LL_VUI; B : c_int) return LL_VF is
VA : constant VUI_View := To_View (A);
D : VF_View; D : VF_View;
VA : constant VUI_View := To_View (To_LL_VUI (A));
K : Vfloat_Range; K : Vfloat_Range;
begin begin
...@@ -2588,7 +2588,7 @@ package body GNAT.Altivec.Low_Level_Vectors is ...@@ -2588,7 +2588,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
-- vctuxs -- -- vctuxs --
------------ ------------
function vctuxs (A : LL_VF; B : c_int) return LL_VSI is function vctuxs (A : LL_VF; B : c_int) return LL_VUI is
VA : constant VF_View := To_View (A); VA : constant VF_View := To_View (A);
D : VUI_View; D : VUI_View;
K : Vfloat_Range; K : Vfloat_Range;
...@@ -2602,7 +2602,7 @@ package body GNAT.Altivec.Low_Level_Vectors is ...@@ -2602,7 +2602,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
* F64 (2.0 ** Integer (B))); * F64 (2.0 ** Integer (B)));
end loop; end loop;
return To_LL_VSI (To_Vector (D)); return To_Vector (D);
end vctuxs; end vctuxs;
--------- ---------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- (Soft Binding Version) -- -- (Soft Binding Version) --
-- -- -- --
-- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -111,11 +111,11 @@ package GNAT.Altivec.Low_Level_Vectors is ...@@ -111,11 +111,11 @@ package GNAT.Altivec.Low_Level_Vectors is
function vcmpgtsw (A : LL_VSI; B : LL_VSI) return LL_VSI; function vcmpgtsw (A : LL_VSI; B : LL_VSI) return LL_VSI;
function vcmpgtfp (A : LL_VF; B : LL_VF) return LL_VSI; function vcmpgtfp (A : LL_VF; B : LL_VF) return LL_VSI;
function vcfux (A : LL_VSI; B : c_int) return LL_VF; function vcfux (A : LL_VUI; B : c_int) return LL_VF;
function vcfsx (A : LL_VSI; B : c_int) return LL_VF; function vcfsx (A : LL_VSI; B : c_int) return LL_VF;
function vctsxs (A : LL_VF; B : c_int) return LL_VSI; function vctsxs (A : LL_VF; B : c_int) return LL_VSI;
function vctuxs (A : LL_VF; B : c_int) return LL_VSI; function vctuxs (A : LL_VF; B : c_int) return LL_VUI;
procedure dss (A : c_int); procedure dss (A : c_int);
procedure dssall; procedure dssall;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -34,17 +34,13 @@ ...@@ -34,17 +34,13 @@
with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types; with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types;
with GNAT.Altivec.Low_Level_Interface; use GNAT.Altivec.Low_Level_Interface; with GNAT.Altivec.Low_Level_Interface; use GNAT.Altivec.Low_Level_Interface;
with GNAT.Altivec.Low_Level_Vectors;
package GNAT.Altivec.Vector_Operations is package GNAT.Altivec.Vector_Operations is
-- The vast majority of the operations exposed here are overloads over a -- The vast majority of the operations exposed here are type conversion
-- much smaller set of low level primitives with type conversions around. -- wrappers around a much smaller set of low level primitives, exposed by
-- -- the Altivec.Low_Level_Interface package.
-- In some cases, a direct binding without any intermediate body is
-- possible or even mandatory for technical reasons. What we provide
-- here for such cases are renamings of straight imports exposed by
-- Altivec.Low_Level_Interface. See the comments in the private part for
-- additional details.
------------------------------------------------------- -------------------------------------------------------
-- [PIM-4.4 Generic and Specific AltiVec operations] -- -- [PIM-4.4 Generic and Specific AltiVec operations] --
...@@ -850,45 +846,33 @@ package GNAT.Altivec.Vector_Operations is ...@@ -850,45 +846,33 @@ package GNAT.Altivec.Vector_Operations is
(A : vector_float; (A : vector_float;
B : vector_float) return vector_bool_int; B : vector_float) return vector_bool_int;
-- vec_ctf --
function vec_ctf
(A : vector_unsigned_int;
B : c_int) return vector_float
renames Low_Level_Interface.vec_ctf_vui_cint_r_vf;
function vec_ctf
(A : vector_signed_int;
B : c_int) return vector_float
renames Low_Level_Interface.vec_ctf_vsi_cint_r_vf;
-- vec_vcfsx -- -- vec_vcfsx --
function vec_vcfsx function vec_vcfsx
(A : vector_signed_int; (A : vector_signed_int;
B : c_int) return vector_float B : c_int) return vector_float
renames Low_Level_Interface.vec_vcfsx_vsi_cint_r_vf; renames Low_Level_Vectors.vcfsx;
-- vec_vcfux -- -- vec_vcfux --
function vec_vcfux function vec_vcfux
(A : vector_unsigned_int; (A : vector_unsigned_int;
B : c_int) return vector_float B : c_int) return vector_float
renames Low_Level_Interface.vec_vcfux_vui_cint_r_vf; renames Low_Level_Vectors.vcfux;
-- vec_cts -- -- vec_vctsxs --
function vec_cts function vec_vctsxs
(A : vector_float; (A : vector_float;
B : c_int) return vector_signed_int B : c_int) return vector_signed_int
renames Low_Level_Interface.vec_cts_vf_cint_r_vsi; renames Low_Level_Vectors.vctsxs;
-- vec_ctu -- -- vec_vctuxs --
function vec_ctu function vec_vctuxs
(A : vector_float; (A : vector_float;
B : c_int) return vector_unsigned_int B : c_int) return vector_unsigned_int
renames Low_Level_Interface.vec_ctu_vf_cint_r_vui; renames Low_Level_Vectors.vctuxs;
-- vec_dss -- -- vec_dss --
...@@ -5825,6 +5809,32 @@ package GNAT.Altivec.Vector_Operations is ...@@ -5825,6 +5809,32 @@ package GNAT.Altivec.Vector_Operations is
-- Straight overloads of routines aboves -- -- Straight overloads of routines aboves --
------------------------------------------- -------------------------------------------
-- vec_ctf --
function vec_ctf
(A : vector_unsigned_int;
B : c_int) return vector_float
renames vec_vcfux;
function vec_ctf
(A : vector_signed_int;
B : c_int) return vector_float
renames vec_vcfsx;
-- vec_cts --
function vec_cts
(A : vector_float;
B : c_int) return vector_signed_int
renames vec_vctsxs;
-- vec_ctu --
function vec_ctu
(A : vector_float;
B : c_int) return vector_unsigned_int
renames vec_vctuxs;
-- vec_vaddcuw -- -- vec_vaddcuw --
function vec_vaddcuw function vec_vaddcuw
...@@ -6096,20 +6106,6 @@ package GNAT.Altivec.Vector_Operations is ...@@ -6096,20 +6106,6 @@ package GNAT.Altivec.Vector_Operations is
B : vector_float) return vector_bool_int B : vector_float) return vector_bool_int
renames vec_cmpge; renames vec_cmpge;
-- vec_vctsxs --
function vec_vctsxs
(A : vector_float;
B : c_int) return vector_signed_int
renames vec_cts;
-- vec_vctuxs --
function vec_vctuxs
(A : vector_float;
B : c_int) return vector_unsigned_int
renames vec_ctu;
-- vec_vexptefp -- -- vec_vexptefp --
function vec_vexptefp function vec_vexptefp
...@@ -7868,17 +7864,6 @@ private ...@@ -7868,17 +7864,6 @@ private
-- begin -- begin
-- return To_VBC (vcmpgtub (To_VSC (B), To_VSC (A))); -- return To_VBC (vcmpgtub (To_VSC (B), To_VSC (A)));
-- end vec_cmplt; -- end vec_cmplt;
--
-- Conversely, a direct (without wrapper) binding is sometimes mandatory
-- in the Hard binding case, because the corresponding low level code
-- accept only literal values for some arguments. Inlined calls to the
-- wrapper with proper arguments would be fine, but the wrapper body
-- itself would not be compilable. These can of course also be used in the
-- Soft binding, and so are naturally in this common unit.
--
-- Fortunately, the sets of operations for which a wrapper is required
-- and the set of operations for which a wrapper would not be compilable
-- do not intersect.
----------------------------- -----------------------------
-- Inlining considerations -- -- Inlining considerations --
......
...@@ -15730,7 +15730,8 @@ package body Sem_Prag is ...@@ -15730,7 +15730,8 @@ package body Sem_Prag is
("pragma% only allowed for private type", Arg1); ("pragma% only allowed for private type", Arg1);
end if; end if;
-- Not allowed for abstract type -- Not allowed for abstract type in the non-class case (it is
-- allowed to use Invariant'Class for abstract types).
if Is_Abstract_Type (Typ) and then not Class_Present (N) then if Is_Abstract_Type (Typ) and then not Class_Present (N) then
Error_Pragma_Arg Error_Pragma_Arg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment