diff options
-rw-r--r-- | gcc/ada/s-vaflop-vms-alpha.adb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ada/s-vaflop-vms-alpha.adb b/gcc/ada/s-vaflop-vms-alpha.adb index 24c4b53829f..d00ca1dba85 100644 --- a/gcc/ada/s-vaflop-vms-alpha.adb +++ b/gcc/ada/s-vaflop-vms-alpha.adb @@ -32,7 +32,7 @@ -- -- ------------------------------------------------------------------------------ -with System.IO; use System.IO; +with System.IO; with System.Machine_Code; use System.Machine_Code; package body System.Vax_Float_Operations is @@ -328,7 +328,7 @@ 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; -------------------- @@ -337,7 +337,7 @@ package body System.Vax_Float_Operations is procedure Debug_Output_F (Arg : F) is begin - Put (F'Image (Arg)); + System.IO.Put (F'Image (Arg)); end Debug_Output_F; -------------------- @@ -346,7 +346,7 @@ package body System.Vax_Float_Operations is procedure Debug_Output_G (Arg : G) is begin - Put (G'Image (Arg)); + System.IO.Put (G'Image (Arg)); end Debug_Output_G; -------------------- @@ -627,7 +627,7 @@ package body System.Vax_Float_Operations is procedure pd (Arg : D) is begin - Put_Line (D'Image (Arg)); + System.IO.Put_Line (D'Image (Arg)); end pd; -------- @@ -636,7 +636,7 @@ package body System.Vax_Float_Operations is procedure pf (Arg : F) is begin - Put_Line (F'Image (Arg)); + System.IO.Put_Line (F'Image (Arg)); end pf; -------- @@ -645,7 +645,7 @@ package body System.Vax_Float_Operations is procedure pg (Arg : G) is begin - Put_Line (G'Image (Arg)); + System.IO.Put_Line (G'Image (Arg)); end pg; -------------- @@ -654,11 +654,13 @@ package body System.Vax_Float_Operations is 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; @@ -669,11 +671,13 @@ package body System.Vax_Float_Operations is 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; @@ -683,11 +687,13 @@ package body System.Vax_Float_Operations is 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; |