sqrt on alphaev6
Toon Moene
toon@moene.indiv.nluug.nl
Thu Aug 19 12:14:00 GMT 1999
Brad Lucier wrote:
> with -mcpu=ev6 -mieee on alphaev6 with gcc 2.95.1 the following code
> is typically generated for sqrt:
> sqrttsu $f16,$f0
> cmpteqsu $f0,$f0,$f10 ; check for NaN?
> fbne $f10,$L836
> jsr $26,sqrt
> ldgp $29,0($26)
> $L836:
> My question is whether the call to the sqrt routines is necessary
> for ev6. I find 21264hrm.pdf to be somewhat confusing, but it
> seems to imply that software completion is not needed on the 21264.
According to the documentation accompanying gcc, one can specify the
following macro name for any target architecture (cpu/os combination):
`TARGET_EDOM'
The value of `EDOM' on the target machine, as a C integer constant
expression. If you don't define this macro, GNU CC does not
attempt to deposit the value of `EDOM' into `errno' directly.
Look in `/usr/include/errno.h' to find the value of `EDOM' on your
system.
If you do not define `TARGET_EDOM', then compiled code reports
domain errors by calling the library function and letting it
report the error. If mathematical functions on your system use
`matherr' when there is an error, then you should leave
`TARGET_EDOM' undefined so that `matherr' is used normally.
This constant is not defined for many targets:
[toon@moene config]$ grep TARGET_EDOM */*.h
arm/linux-aout.h:#define TARGET_EDOM 33
arm/riscix.h:#define TARGET_EDOM 33
sparc/sparc.h:#define TARGET_EDOM 33
HTH,
PS: As this has no relevance for other languages than those in the C
family, the Fortran Frontend causes this call to sqrt *not* to be
generated.
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html
More information about the Gcc
mailing list