Commit a56955b1 by Eric Botcazou Committed by Eric Botcazou

a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber x87 registers.

	* a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
	x87 registers.

From-SVN: r128329
parent f8568ac0
2007-09-10 Eric Botcazou <ebotcazou@adacore.com> 2007-09-10 Eric Botcazou <ebotcazou@adacore.com>
* a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
x87 registers.
2007-09-10 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
a debug renaming declaration specially. a debug renaming declaration specially.
...@@ -302,15 +302,14 @@ package body Ada.Numerics.Aux is ...@@ -302,15 +302,14 @@ package body Ada.Numerics.Aux is
begin begin
Asm (Template => "" -- X : Y Asm (Template => "" -- X : Y
& "fyl2x " & NL -- Y * Log2 (X) & "fyl2x " & NL -- Y * Log2 (X)
& "fst %%st(1) " & NL -- Y * Log2 (X) : Y * Log2 (X) & "fld %%st(0) " & NL -- Y * Log2 (X) : Y * Log2 (X)
& "frndint " & NL -- Int (...) : Y * Log2 (X) & "frndint " & NL -- Int (...) : Y * Log2 (X)
& "fsubr %%st, %%st(1)" & NL -- Int (...) : Fract (...) & "fsubr %%st, %%st(1)" & NL -- Int (...) : Fract (...)
& "fxch " & NL -- Fract (...) : Int (...) & "fxch " & NL -- Fract (...) : Int (...)
& "f2xm1 " & NL -- 2**Fract (...) - 1 : Int (...) & "f2xm1 " & NL -- 2**Fract (...) - 1 : Int (...)
& "fld1 " & NL -- 1 : 2**Fract (...) - 1 : Int (...) & "fld1 " & NL -- 1 : 2**Fract (...) - 1 : Int (...)
& "faddp %%st, %%st(1)" & NL -- 2**Fract (...) : Int (...) & "faddp %%st, %%st(1)" & NL -- 2**Fract (...) : Int (...)
& "fscale " & NL -- 2**(Fract (...) + Int (...)) & "fscale ", -- 2**(Fract (...) + Int (...))
& "fstp %%st(1) ",
Outputs => Double'Asm_Output ("=t", Result), Outputs => Double'Asm_Output ("=t", Result),
Inputs => Inputs =>
(Double'Asm_Input ("0", X), (Double'Asm_Input ("0", X),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment