From: rieachus@comcast.net
Subject: Re: Profiling Ada binaries
Date: Mon, 1 Aug 2016 15:40:13 -0700 (PDT)
Date: 2016-08-01T15:40:13-07:00 [thread overview]
Message-ID: <845e12db-9e2c-4d0f-a3b0-19ac50f14d24@googlegroups.com> (raw)
In-Reply-To: <04e12bd0-2c9d-f90d-2497-bf58593addfd@spam.spam>
On Tuesday, July 26, 2016 at 4:37:31 AM UTC-4, Markus Schöpflin wrote:
> GNAT by default uses static elaboration. There should be no elaboration checks
> when calling the generic versions. Or am I mistaken here?
From the GNAT documentation: Strict conformance to the Ada Reference Manual can be achieved by adding two compiler options for dynamic checks for access-before-elaboration on subprogram calls and generic instantiations (-gnatE) and stack overflow checking (-fstack-check).
> > I believe GNAT
> > has non-generic versions for Short_Float, Float, and Long_Float which use
> > the hardware built-ins. But I doubt you would get that automatically with
> > -O1.
> Even using the non-generic versions I have not been able to get the hardware
> built-ins. The best I can achieve for a call to e.g. cos(X) is:
> call ada__numerics__long_elementary_functions__cos
That's silly. A project for a rainy afternoon. Hmm. May rain today...
Again GNAT docs to the rescue: 15.1 Machine code insertions:
The equivalent can be written for GNAT as:
Asm ("fsinx %1 %0",
My_Float'Asm_Output ("=f", result),
My_Float'Asm_Input ("f", angle));
I assume I wrap that in a function call:
function Sin(Angle: in Float) return Float is
Asm ("fsinx %1 %0",
My_Float'Asm_Output ("=f", result),
My_Float'Asm_Input ("f", angle));
end Sin;
Now all I have to do is put together a set of test cases...
next prev parent reply other threads:[~2016-08-01 22:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 13:24 Profiling Ada binaries Markus Schöpflin
2016-07-22 14:59 ` Alejandro R. Mosteo
2016-07-22 15:05 ` Alejandro R. Mosteo
2016-07-25 7:01 ` Markus Schöpflin
2016-07-25 16:45 ` rieachus
2016-07-25 17:14 ` Simon Wright
2016-07-25 22:05 ` rieachus
2016-07-26 8:37 ` Markus Schöpflin
2016-08-01 22:40 ` rieachus [this message]
2016-08-01 23:36 ` Jeffrey R. Carter
2016-08-02 7:00 ` Markus Schöpflin
2016-08-05 3:18 ` rieachus
2016-08-05 20:27 ` Randy Brukardt
2016-08-02 6:39 ` Markus Schöpflin
2016-07-25 6:57 ` Markus Schöpflin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox