s-osinte-tru64.adb: Mark Asm statements Volatile to prevent warnings (seems a reasonable change...
2006-10-31 Robert Dewar <dewar@adacore.com> * s-osinte-tru64.adb: Mark Asm statements Volatile to prevent warnings (seems a reasonable change anyway) Fixes new warnings * s-mastop-irix.adb: Add Volatile to Asm statements Suppresses warning, and seems appropriate in any case * s-osinte-vms.adb: Add Volatile to Asm statement * s-vaflop-vms-alpha.adb: Add Volatile to Asm statements * exp_code.ads, exp_code.adb (Asm_Input_Value): Note that Error can be returned. Add call to Check_Code_Statement From-SVN: r118329
This commit is contained in:
parent
ba1cbfb946
commit
e0ae4e94e9
6 changed files with 220 additions and 138 deletions
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1996-2004 Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1996-2006, 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- --
|
||||
|
@ -36,6 +36,7 @@ with Opt; use Opt;
|
|||
with Rtsfind; use Rtsfind;
|
||||
with Sem_Eval; use Sem_Eval;
|
||||
with Sem_Util; use Sem_Util;
|
||||
with Sem_Warn; use Sem_Warn;
|
||||
with Sinfo; use Sinfo;
|
||||
with Stringt; use Stringt;
|
||||
with Tbuild; use Tbuild;
|
||||
|
@ -124,6 +125,8 @@ package body Exp_Code is
|
|||
begin
|
||||
if No (Operand_Var) then
|
||||
return Empty;
|
||||
elsif Error_Posted (Operand_Var) then
|
||||
return Error;
|
||||
else
|
||||
return Next (First (Expressions (Operand_Var)));
|
||||
end if;
|
||||
|
@ -227,7 +230,6 @@ package body Exp_Code is
|
|||
|
||||
Name_Buffer (Name_Len + 1) := ASCII.NUL;
|
||||
return Name_Buffer'Address;
|
||||
|
||||
end Clobber_Get_Next;
|
||||
|
||||
-------------------
|
||||
|
@ -240,12 +242,10 @@ package body Exp_Code is
|
|||
Next_Actual (
|
||||
Next_Actual (
|
||||
First_Actual (Call))));
|
||||
|
||||
begin
|
||||
if not Is_OK_Static_Expression (Clob) then
|
||||
Flag_Non_Static_Expr ("asm clobber argument is not static!", Clob);
|
||||
Clobber_Node := Empty;
|
||||
|
||||
else
|
||||
Clobber_Node := Get_String_Node (Clob);
|
||||
Clobber_Ptr := 1;
|
||||
|
@ -262,11 +262,15 @@ package body Exp_Code is
|
|||
procedure Check_IO_Operand (N : Node_Id);
|
||||
-- Check for incorrect input or output operand
|
||||
|
||||
----------------------
|
||||
-- Check_IO_Operand --
|
||||
----------------------
|
||||
|
||||
procedure Check_IO_Operand (N : Node_Id) is
|
||||
Err : Node_Id := N;
|
||||
|
||||
begin
|
||||
-- The only identifier allows is No_xxput_Operands. Since we
|
||||
-- The only identifier allowed is No_xxput_Operands. Since we
|
||||
-- know the type is right, it is sufficient to see if the
|
||||
-- referenced entity is in a runtime routine.
|
||||
|
||||
|
@ -333,7 +337,6 @@ package body Exp_Code is
|
|||
declare
|
||||
Arg_Output : constant Node_Id := Next_Actual (First_Actual (N));
|
||||
Arg_Input : constant Node_Id := Next_Actual (Arg_Output);
|
||||
|
||||
begin
|
||||
Check_IO_Operand (Arg_Output);
|
||||
Check_IO_Operand (Arg_Input);
|
||||
|
@ -364,9 +367,13 @@ package body Exp_Code is
|
|||
|
||||
-- There is no need to reanalyze this node, it is completely analyzed
|
||||
-- already, at least sufficiently for the purposes of the abstract
|
||||
-- procedural interface defined in this package.
|
||||
-- procedural interface defined in this package. Furthermore if we
|
||||
-- let it go through the normal analysis, that would include some
|
||||
-- inappropriate checks that apply only to explicit code statements
|
||||
-- in the source, and not to calls to intrinsics.
|
||||
|
||||
Set_Analyzed (N);
|
||||
Check_Code_Statement (N);
|
||||
end if;
|
||||
end Expand_Asm_Call;
|
||||
|
||||
|
@ -378,7 +385,6 @@ package body Exp_Code is
|
|||
begin
|
||||
if Nkind (S) = N_String_Literal then
|
||||
return S;
|
||||
|
||||
else
|
||||
pragma Assert (Ekind (Entity (S)) = E_Constant);
|
||||
return Get_String_Node (Constant_Value (Entity (S)));
|
||||
|
@ -397,12 +403,10 @@ package body Exp_Code is
|
|||
Next_Actual (
|
||||
Next_Actual (
|
||||
First_Actual (Call)))));
|
||||
|
||||
begin
|
||||
if not Is_OK_Static_Expression (Vol) then
|
||||
Flag_Non_Static_Expr ("asm volatile argument is not static!", Vol);
|
||||
return False;
|
||||
|
||||
else
|
||||
return Is_True (Expr_Value (Vol));
|
||||
end if;
|
||||
|
@ -427,7 +431,6 @@ package body Exp_Code is
|
|||
|
||||
if Nkind (Parent (Operand_Var)) = N_Aggregate then
|
||||
Operand_Var := Next (Operand_Var);
|
||||
|
||||
else
|
||||
Operand_Var := Empty;
|
||||
end if;
|
||||
|
@ -448,7 +451,6 @@ package body Exp_Code is
|
|||
|
||||
procedure Setup_Asm_Inputs (N : Node_Id) is
|
||||
Call : constant Node_Id := Expression (Expression (N));
|
||||
|
||||
begin
|
||||
Setup_Asm_IO_Args
|
||||
(Next_Actual (Next_Actual (First_Actual (Call))),
|
||||
|
@ -488,7 +490,6 @@ package body Exp_Code is
|
|||
|
||||
procedure Setup_Asm_Outputs (N : Node_Id) is
|
||||
Call : constant Node_Id := Expression (Expression (N));
|
||||
|
||||
begin
|
||||
Setup_Asm_IO_Args
|
||||
(Next_Actual (First_Actual (Call)),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1996 Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1996-2006, 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- --
|
||||
|
@ -32,8 +32,7 @@ with System; use System;
|
|||
package Exp_Code is
|
||||
|
||||
procedure Expand_Asm_Call (N : Node_Id);
|
||||
-- Expands a call to Asm or Asm_Volatile into an equivalent
|
||||
-- N_Code_Statement node.
|
||||
-- Expands a call to Asm into an equivalent N_Code_Statement node
|
||||
|
||||
-- The following routines provide an abstract interface to analyze
|
||||
-- code statements, for use by Gigi processing for code statements.
|
||||
|
@ -41,8 +40,8 @@ package Exp_Code is
|
|||
-- to expand tables that are frozen on entry to Gigi.
|
||||
|
||||
function Is_Asm_Volatile (N : Node_Id) return Boolean;
|
||||
-- Given an N_Code_Statement node N, return True in the Asm_Volatile
|
||||
-- case and False in the Asm case.
|
||||
-- Given an N_Code_Statement node N, return True if Volatile=True is
|
||||
-- specified, and False if Volatile=False is specified (or set by default).
|
||||
|
||||
function Asm_Template (N : Node_Id) return Node_Id;
|
||||
-- Given an N_Code_Statement node N, returns string literal node for
|
||||
|
@ -82,7 +81,10 @@ package Exp_Code is
|
|||
-- Called within a loop initialized by Setup_Asm_Inputs and controlled
|
||||
-- by Next_Asm_Input as described above. Returns the expression node for
|
||||
-- the value component of the current Asm_Input parameter, or Empty if
|
||||
-- there are no more Asm_Input parameters.
|
||||
-- there are no more Asm_Input parameters, or Error if an error was
|
||||
-- previously detected in the input parameters (note that the backend
|
||||
-- need not worry about this case, since it won't be called if there
|
||||
-- were any such serious errors detected).
|
||||
|
||||
procedure Next_Asm_Input;
|
||||
-- Step to next Asm_Input parameter. It is an error to call this procedure
|
||||
|
@ -94,7 +96,7 @@ package Exp_Code is
|
|||
-- arguments. The protocol is to construct a loop as follows:
|
||||
--
|
||||
-- Setup_Asm_Outputs (N);
|
||||
-- while Present (Asm_Output_Value)
|
||||
-- while Present (Asm_Output_Variable)
|
||||
-- body
|
||||
-- Next_Asm_Output;
|
||||
-- end loop;
|
||||
|
@ -110,10 +112,13 @@ package Exp_Code is
|
|||
-- Empty if there are no more Asm_Output parameters.
|
||||
|
||||
function Asm_Output_Variable return Node_Id;
|
||||
-- Called within a loop initialized by Setup_Asm_Outputs and controlled
|
||||
-- by Next_Asm_Output as described above. Returns the expression node for
|
||||
-- the output variable component of the current Asm_Output parameter, or
|
||||
-- Empty if there are no more Asm_Output parameters.
|
||||
-- Called within a loop initialized by Setup_Asm_Outputs and controlled by
|
||||
-- Next_Asm_Output as described above. Returns the expression node for the
|
||||
-- output variable component of the current Asm_Output parameter, or Empty
|
||||
-- if there are no more Asm_Output parameters, or Error if an error was
|
||||
-- previously detected in the input parameters (note that the backend need
|
||||
-- not worry about this case, since it won't be called if there were any
|
||||
-- such serious errors detected).
|
||||
|
||||
procedure Next_Asm_Output;
|
||||
-- Step to next Asm_Output parameter. It is an error to call this procedure
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- B o d y --
|
||||
-- (Version for IRIX/MIPS) --
|
||||
-- --
|
||||
-- Copyright (C) 1999-2005 Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1999-2006, 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- --
|
||||
|
@ -278,12 +278,15 @@ package body System.Machine_State_Operations is
|
|||
|
||||
procedure Set_Machine_State (M : Machine_State) is
|
||||
|
||||
STOREI : constant String (1 .. 2) := 's' & LSC;
|
||||
SI : constant String (1 .. 2) := 's' & LSC;
|
||||
-- This is "sw" in o32 mode, and "sd" in n32 mode
|
||||
|
||||
STOREF : constant String (1 .. 4) := 's' & LSC & "c1";
|
||||
SF : constant String (1 .. 4) := 's' & LSC & "c1";
|
||||
-- This is "swc1" in o32 mode and "sdc1" in n32 mode
|
||||
|
||||
PI : String renames SC_Regs_Pos;
|
||||
PF : String renames SC_Fpregs_Pos;
|
||||
|
||||
Scp : Sigcontext_Ptr;
|
||||
|
||||
begin
|
||||
|
@ -294,41 +297,41 @@ package body System.Machine_State_Operations is
|
|||
|
||||
<<Past_Prolog>>
|
||||
|
||||
Asm (STOREI & " $16, 16*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $17, 17*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $18, 18*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $19, 19*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $20, 20*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $21, 21*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $22, 22*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $23, 23*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $24, 24*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $25, 25*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $26, 26*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $27, 27*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $28, 28*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $29, 29*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $30, 30*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (STOREI & " $31, 31*8+" & Roff & "+" & SC_Regs_Pos & "($4)");
|
||||
Asm (SI & " $16, 16*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $17, 17*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $18, 18*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $19, 19*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $20, 20*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $21, 21*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $22, 22*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $23, 23*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $24, 24*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $25, 25*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $26, 26*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $27, 27*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $28, 28*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $29, 29*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $30, 30*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
Asm (SI & " $31, 31*8+" & Roff & "+" & PI & "($4)", Volatile => True);
|
||||
|
||||
-- Restore floating-point registers from machine state
|
||||
|
||||
Asm (STOREF & " $f16, 16*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f17, 17*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f18, 18*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f19, 19*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f20, 20*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f21, 21*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f22, 22*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f23, 23*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f24, 24*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f25, 25*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f26, 26*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f27, 27*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f28, 28*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f29, 29*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f30, 30*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (STOREF & " $f31, 31*8+" & Roff & "+" & SC_Fpregs_Pos & "($4)");
|
||||
Asm (SF & " $f16, 16*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f17, 17*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f18, 18*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f19, 19*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f20, 20*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f21, 21*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f22, 22*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f23, 23*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f24, 24*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f25, 25*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f26, 26*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f27, 27*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f28, 28*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f29, 29*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f30, 30*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
Asm (SF & " $f31, 31*8+" & Roff & "+" & PF & "($4)", Volatile => True);
|
||||
|
||||
-- Set the PC value for the context to a location after the
|
||||
-- prolog has been executed.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1998-2005, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1998-2006, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNARL 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- --
|
||||
|
@ -73,8 +73,9 @@ package body System.OS_Interface is
|
|||
begin
|
||||
Asm ("call_pal 0x9e" & ASCII.LF & ASCII.HT &
|
||||
"bis $31, $0, %0",
|
||||
Outputs => pthread_t'Asm_Output ("=r", Self),
|
||||
Clobber => "$0");
|
||||
Outputs => pthread_t'Asm_Output ("=r", Self),
|
||||
Clobber => "$0",
|
||||
Volatile => True);
|
||||
return Self;
|
||||
end pthread_self;
|
||||
|
||||
|
@ -93,8 +94,9 @@ package body System.OS_Interface is
|
|||
|
||||
Asm ("call_pal 0x9e" & ASCII.LF & ASCII.HT &
|
||||
"bis $31, $0, %0",
|
||||
Outputs => Teb_Ptr'Asm_Output ("=r", Teb),
|
||||
Clobber => "$0");
|
||||
Outputs => Teb_Ptr'Asm_Output ("=r", Teb),
|
||||
Clobber => "$0",
|
||||
Volatile => True);
|
||||
|
||||
-- Stick a guard page right above the Yellow Zone if it exists
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1991-1994, Florida State University --
|
||||
-- Copyright (C) 1995-2005, AdaCore --
|
||||
-- Copyright (C) 1995-2006, AdaCore --
|
||||
-- --
|
||||
-- GNARL 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- --
|
||||
|
@ -57,8 +57,9 @@ package body System.OS_Interface is
|
|||
begin
|
||||
Asm ("call_pal 0x9e" & LF & HT &
|
||||
"bis $31, $0, %0",
|
||||
Outputs => pthread_t'Asm_Output ("=r", Self),
|
||||
Clobber => "$0");
|
||||
Outputs => pthread_t'Asm_Output ("=r", Self),
|
||||
Clobber => "$0",
|
||||
Volatile => True);
|
||||
return Self;
|
||||
end pthread_self;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1997-2006, Free Software Foundation, Inc. --
|
||||
-- (Version for Alpha OpenVMS) --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
|
@ -69,9 +69,12 @@ package body System.Vax_Float_Operations is
|
|||
A, B : T;
|
||||
C : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), D'Asm_Input ("m", X));
|
||||
Asm ("cvtdg %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), D'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("cvtdg %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end D_To_G;
|
||||
|
||||
|
@ -83,8 +86,10 @@ package body System.Vax_Float_Operations is
|
|||
A : T;
|
||||
B : G;
|
||||
begin
|
||||
Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A));
|
||||
Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end F_To_G;
|
||||
|
||||
|
@ -100,7 +105,8 @@ package body System.Vax_Float_Operations is
|
|||
-- Because converting to a wider FP format is a no-op, we say
|
||||
-- A is 64-bit even though we are loading 32 bits into it.
|
||||
|
||||
Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
|
||||
B := S (Cvt_G_T (A));
|
||||
return B;
|
||||
|
@ -114,9 +120,12 @@ package body System.Vax_Float_Operations is
|
|||
A, B : T;
|
||||
C : D;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("cvtgd %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("stg %1,%0", D'Asm_Output ("=m", C), T'Asm_Input ("f", B));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("cvtgd %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", D'Asm_Output ("=m", C), T'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end G_To_D;
|
||||
|
||||
|
@ -129,9 +138,12 @@ package body System.Vax_Float_Operations is
|
|||
B : S;
|
||||
C : F;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("cvtgf %1,%0", S'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("cvtgf %1,%0", S'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end G_To_F;
|
||||
|
||||
|
@ -143,8 +155,10 @@ package body System.Vax_Float_Operations is
|
|||
A : T;
|
||||
B : Q;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("cvtgq %1,%0", Q'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("cvtgq %1,%0", Q'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end G_To_Q;
|
||||
|
||||
|
@ -155,7 +169,8 @@ package body System.Vax_Float_Operations is
|
|||
function G_To_T (X : G) return T is
|
||||
A, B : T;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
B := Cvt_G_T (A);
|
||||
return B;
|
||||
end G_To_T;
|
||||
|
@ -177,8 +192,10 @@ package body System.Vax_Float_Operations is
|
|||
A : S;
|
||||
B : F;
|
||||
begin
|
||||
Asm ("cvtqf %1,%0", S'Asm_Output ("=f", A), Q'Asm_Input ("f", X));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A));
|
||||
Asm ("cvtqf %1,%0", S'Asm_Output ("=f", A), Q'Asm_Input ("f", X),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end Q_To_F;
|
||||
|
||||
|
@ -190,8 +207,10 @@ package body System.Vax_Float_Operations is
|
|||
A : T;
|
||||
B : G;
|
||||
begin
|
||||
Asm ("cvtqg %1,%0", T'Asm_Output ("=f", A), Q'Asm_Input ("f", X));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A));
|
||||
Asm ("cvtqg %1,%0", T'Asm_Output ("=f", A), Q'Asm_Input ("f", X),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end Q_To_G;
|
||||
|
||||
|
@ -204,7 +223,8 @@ package body System.Vax_Float_Operations is
|
|||
B : F;
|
||||
begin
|
||||
A := Cvt_T_F (T (X));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end S_To_F;
|
||||
|
||||
|
@ -226,7 +246,8 @@ package body System.Vax_Float_Operations is
|
|||
B : G;
|
||||
begin
|
||||
A := Cvt_T_G (X);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
return B;
|
||||
end T_To_G;
|
||||
|
||||
|
@ -238,9 +259,12 @@ package body System.Vax_Float_Operations is
|
|||
A, B : S;
|
||||
C : F;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X));
|
||||
Asm ("cpys $f31,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X),
|
||||
Volatile => True);
|
||||
Asm ("cpys $f31,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end Abs_F;
|
||||
|
||||
|
@ -253,8 +277,10 @@ package body System.Vax_Float_Operations is
|
|||
C : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("cpys $f31,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B));
|
||||
Asm ("cpys $f31,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end Abs_G;
|
||||
|
||||
|
@ -267,10 +293,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : F;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("addf %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Add_F;
|
||||
|
||||
|
@ -283,10 +312,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("addg %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Add_G;
|
||||
|
||||
|
@ -362,10 +394,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : F;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("divf %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Div_F;
|
||||
|
||||
|
@ -378,10 +413,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("divg %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Div_G;
|
||||
|
||||
|
@ -393,9 +431,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : S;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgeq %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Eq_F;
|
||||
|
||||
|
@ -407,9 +447,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : T;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgeq %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Eq_G;
|
||||
|
||||
|
@ -421,9 +463,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : S;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgle %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Le_F;
|
||||
|
||||
|
@ -435,9 +479,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : T;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgle %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Le_G;
|
||||
|
||||
|
@ -449,9 +495,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : S;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpglt %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Lt_F;
|
||||
|
||||
|
@ -463,9 +511,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : T;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpglt %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R /= 0.0;
|
||||
end Lt_G;
|
||||
|
||||
|
@ -478,10 +528,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : F;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("mulf %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Mul_F;
|
||||
|
||||
|
@ -494,10 +547,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("mulg %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Mul_G;
|
||||
|
||||
|
@ -509,9 +565,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : S;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgeq %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R = 0.0;
|
||||
end Ne_F;
|
||||
|
||||
|
@ -523,9 +581,11 @@ package body System.Vax_Float_Operations is
|
|||
X1, Y1, R : T;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("cmpgeq %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
return R = 0.0;
|
||||
end Ne_G;
|
||||
|
||||
|
@ -538,8 +598,10 @@ package body System.Vax_Float_Operations is
|
|||
C : F;
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X));
|
||||
Asm ("cpysn %1,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B));
|
||||
Asm ("cpysn %1,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", C), S'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end Neg_F;
|
||||
|
||||
|
@ -552,8 +614,10 @@ package body System.Vax_Float_Operations is
|
|||
C : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X));
|
||||
Asm ("cpysn %1,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B));
|
||||
Asm ("cpysn %1,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", C), T'Asm_Input ("f", B),
|
||||
Volatile => True);
|
||||
return C;
|
||||
end Neg_G;
|
||||
|
||||
|
@ -594,10 +658,13 @@ package body System.Vax_Float_Operations is
|
|||
|
||||
begin
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y));
|
||||
Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("subf %1,%2,%0", S'Asm_Output ("=f", R),
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)));
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R));
|
||||
(S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stf %1,%0", F'Asm_Output ("=m", R1), S'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Sub_F;
|
||||
|
||||
|
@ -610,10 +677,13 @@ package body System.Vax_Float_Operations is
|
|||
R1 : G;
|
||||
begin
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y));
|
||||
Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y),
|
||||
Volatile => True);
|
||||
Asm ("subg %1,%2,%0", T'Asm_Output ("=f", R),
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)));
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R));
|
||||
(T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1)),
|
||||
Volatile => True);
|
||||
Asm ("stg %1,%0", G'Asm_Output ("=m", R1), T'Asm_Input ("f", R),
|
||||
Volatile => True);
|
||||
return R1;
|
||||
end Sub_G;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue