[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
This commit is contained in:
parent
b534f49ed6
commit
1098e722a5
|
@ -1,3 +1,14 @@
|
|||
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.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- 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 --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
|
@ -54,58 +54,6 @@ package GNAT.Altivec.Low_Level_Interface is
|
|||
|
||||
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 --
|
||||
|
||||
procedure vec_dss_cint
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- B o d y --
|
||||
-- (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 --
|
||||
-- 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
|
|||
-- 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;
|
||||
VA : constant VUI_View := To_View (To_LL_VUI (A));
|
||||
K : Vfloat_Range;
|
||||
|
||||
begin
|
||||
|
@ -2588,7 +2588,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
|
|||
-- 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);
|
||||
D : VUI_View;
|
||||
K : Vfloat_Range;
|
||||
|
@ -2602,7 +2602,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
|
|||
* F64 (2.0 ** Integer (B)));
|
||||
end loop;
|
||||
|
||||
return To_LL_VSI (To_Vector (D));
|
||||
return To_Vector (D);
|
||||
end vctuxs;
|
||||
|
||||
---------
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- S p e c --
|
||||
-- (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 --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
|
@ -111,11 +111,11 @@ package GNAT.Altivec.Low_Level_Vectors is
|
|||
function vcmpgtsw (A : LL_VSI; B : LL_VSI) 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 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 dssall;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- 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 --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
|
@ -34,17 +34,13 @@
|
|||
|
||||
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_Vectors;
|
||||
|
||||
package GNAT.Altivec.Vector_Operations is
|
||||
|
||||
-- The vast majority of the operations exposed here are overloads over a
|
||||
-- much smaller set of low level primitives with type conversions around.
|
||||
--
|
||||
-- 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.
|
||||
-- The vast majority of the operations exposed here are type conversion
|
||||
-- wrappers around a much smaller set of low level primitives, exposed by
|
||||
-- the Altivec.Low_Level_Interface package.
|
||||
|
||||
-------------------------------------------------------
|
||||
-- [PIM-4.4 Generic and Specific AltiVec operations] --
|
||||
|
@ -850,45 +846,33 @@ package GNAT.Altivec.Vector_Operations is
|
|||
(A : vector_float;
|
||||
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 --
|
||||
|
||||
function vec_vcfsx
|
||||
(A : vector_signed_int;
|
||||
B : c_int) return vector_float
|
||||
renames Low_Level_Interface.vec_vcfsx_vsi_cint_r_vf;
|
||||
renames Low_Level_Vectors.vcfsx;
|
||||
|
||||
-- vec_vcfux --
|
||||
|
||||
function vec_vcfux
|
||||
(A : vector_unsigned_int;
|
||||
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;
|
||||
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;
|
||||
B : c_int) return vector_unsigned_int
|
||||
renames Low_Level_Interface.vec_ctu_vf_cint_r_vui;
|
||||
renames Low_Level_Vectors.vctuxs;
|
||||
|
||||
-- vec_dss --
|
||||
|
||||
|
@ -5825,6 +5809,32 @@ package GNAT.Altivec.Vector_Operations is
|
|||
-- 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 --
|
||||
|
||||
function vec_vaddcuw
|
||||
|
@ -6096,20 +6106,6 @@ package GNAT.Altivec.Vector_Operations is
|
|||
B : vector_float) return vector_bool_int
|
||||
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 --
|
||||
|
||||
function vec_vexptefp
|
||||
|
@ -7868,17 +7864,6 @@ private
|
|||
-- begin
|
||||
-- return To_VBC (vcmpgtub (To_VSC (B), To_VSC (A)));
|
||||
-- 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 --
|
||||
|
|
|
@ -15730,7 +15730,8 @@ package body Sem_Prag is
|
|||
("pragma% only allowed for private type", Arg1);
|
||||
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
|
||||
Error_Pragma_Arg
|
||||
|
|
Loading…
Reference in New Issue