diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/foreigns.adb | 62 |
1 files changed, 55 insertions, 7 deletions
diff --git a/src/ghdldrv/foreigns.adb b/src/ghdldrv/foreigns.adb index 0d6b19a..b8b49ef 100644 --- a/src/ghdldrv/foreigns.adb +++ b/src/ghdldrv/foreigns.adb @@ -30,27 +30,66 @@ package body Foreigns is function Trunc (Arg : double) return double; pragma Import (C, Trunc); + function Fmod (X, Y : double) return double; + pragma Import (C, Fmod); + + function Fmin (X, Y : double) return double; + pragma Import (C, Fmin); + + function Fmax (X, Y : double) return double; + pragma Import (C, Fmax); + function Sin (Arg : double) return double; pragma Import (C, Sin); function Cos (Arg : double) return double; pragma Import (C, Cos); + function Tan (Arg : double) return double; + pragma Import (C, Tan); + + function Atan (Y : double) return double; + pragma Import (C, Atan); + + function Atan2 (X, Y : double) return double; + pragma Import (C, Atan2); + function Log (Arg : double) return double; pragma Import (C, Log); + function Log2 (Arg : double) return double; + pragma Import (C, Log2); + + function Log10 (Arg : double) return double; + pragma Import (C, Log10); + function Exp (Arg : double) return double; pragma Import (C, Exp); + function Pow (X, Y : double) return double; + pragma Import (C, Pow); + function Sqrt (Arg : double) return double; pragma Import (C, Sqrt); + function Cbrt (Arg : double) return double; + pragma Import (C, Cbrt); + function Asin (Arg : double) return double; pragma Import (C, Asin); function Acos (Arg : double) return double; pragma Import (C, Acos); + function Sinh (Arg : double) return double; + pragma Import (C, Sinh); + + function Cosh (Arg : double) return double; + pragma Import (C, Cosh); + + function Tanh (Arg : double) return double; + pragma Import (C, Tanh); + function Asinh (Arg : double) return double; pragma Import (C, Asinh); @@ -60,9 +99,6 @@ package body Foreigns is function Atanh (X : double) return double; pragma Import (C, Atanh); - function Atan2 (X, Y : double) return double; - pragma Import (C, Atan2); - type String_Cacc is access constant String; type Foreign_Record is record Name : String_Cacc; @@ -75,17 +111,29 @@ package body Foreigns is (new String'("floor"), Floor'Address), (new String'("round"), Round'Address), (new String'("trunc"), Trunc'Address), - (new String'("sin"), Sin'Address), - (new String'("cos"), Cos'Address), + (new String'("fmod"), Fmod'Address), + (new String'("fmin"), Fmin'Address), + (new String'("fmax"), Fmax'Address), (new String'("log"), Log'Address), + (new String'("log2"), Log2'Address), + (new String'("log10"), Log10'Address), (new String'("exp"), Exp'Address), (new String'("sqrt"), Sqrt'Address), + (new String'("cbrt"), Cbrt'Address), + (new String'("pow"), Pow'Address), + (new String'("sin"), Sin'Address), + (new String'("cos"), Cos'Address), + (new String'("tan"), Tan'Address), (new String'("asin"), Asin'Address), (new String'("acos"), Acos'Address), + (new String'("atan"), Atan'Address), + (new String'("atan2"), Atan2'Address), + (new String'("sinh"), Sinh'Address), + (new String'("cosh"), Cosh'Address), + (new String'("tanh"), Tanh'Address), (new String'("asinh"), Asinh'Address), (new String'("acosh"), Acosh'Address), - (new String'("atanh"), Atanh'Address), - (new String'("atan2"), Atan2'Address) + (new String'("atanh"), Atanh'Address) ); function Find_Foreign (Name : String) return Address is |