-- --
------------------------------------------------------------------------------
-with System.IO; use System.IO;
+with System.IO;
with System.Machine_Code; use System.Machine_Code;
package body System.Vax_Float_Operations is
procedure Debug_Output_D (Arg : D) is
begin
- Put (D'Image (Arg));
+ System.IO.Put (D'Image (Arg));
end Debug_Output_D;
--------------------
procedure Debug_Output_F (Arg : F) is
begin
- Put (F'Image (Arg));
+ System.IO.Put (F'Image (Arg));
end Debug_Output_F;
--------------------
procedure Debug_Output_G (Arg : G) is
begin
- Put (G'Image (Arg));
+ System.IO.Put (G'Image (Arg));
end Debug_Output_G;
--------------------
procedure pd (Arg : D) is
begin
- Put_Line (D'Image (Arg));
+ System.IO.Put_Line (D'Image (Arg));
end pd;
--------
procedure pf (Arg : F) is
begin
- Put_Line (F'Image (Arg));
+ System.IO.Put_Line (F'Image (Arg));
end pf;
--------
procedure pg (Arg : G) is
begin
- Put_Line (G'Image (Arg));
+ System.IO.Put_Line (G'Image (Arg));
end pg;
--------------
function Return_D (X : D) return D is
R : D;
+
begin
-- The return value is already in $f0 so we need to trick the compiler
-- into thinking that we're moving X to $f0.
+
Asm ("cvtdg $f0,$f0", Inputs => D'Asm_Input ("g", X), Clobber => "$f0",
- Volatile => True);
+ Volatile => True);
Asm ("stg $f0,%0", D'Asm_Output ("=m", R), Volatile => True);
return R;
end Return_D;
function Return_F (X : F) return F is
R : F;
+
begin
-- The return value is already in $f0 so we need to trick the compiler
-- into thinking that we're moving X to $f0.
+
Asm ("stf $f0,%0", F'Asm_Output ("=m", R), F'Asm_Input ("g", X),
- Clobber => "$f0", Volatile => True);
+ Clobber => "$f0", Volatile => True);
return R;
end Return_F;
function Return_G (X : G) return G is
R : G;
+
begin
-- The return value is already in $f0 so we need to trick the compiler
-- into thinking that we're moving X to $f0.
+
Asm ("stg $f0,%0", G'Asm_Output ("=m", R), G'Asm_Input ("g", X),
- Clobber => "$f0", Volatile => True);
+ Clobber => "$f0", Volatile => True);
return R;
end Return_G;