dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libjit-developers] JIT_REG_INFO and alpha floating point numbers


From: Thomas Cort
Subject: [Libjit-developers] JIT_REG_INFO and alpha floating point numbers
Date: Mon, 29 May 2006 21:36:30 -0400

Hello All,

As you have read on this list, I'm porting libjit to alpha for
Google's Summer of Code :) I'm working on jit-rules-alpha.h now,
specifically defining floating point registers in JIT_REG_INFO. On
alpha, floats are 32-bits and doubles are 64-bits. 1 float or 1 double
can be stored in a 64-bit floating point register. I'm assuming I
should OR JIT_REG_FLOAT32 and JIT_REG_FLOAT64? I was wondering if the
meaning of JIT_REG_NFLOAT could be clarified too.

Many alpha systems (those with processors before EV6) do not fully
implement the IEEE floating point standard. For those earlier systems,
there is no hardware support for denormalized numbers or exceptional
IEEE values like not a number and positive/negative infinity. For C
programs on those systems, gcc has a flag "-mieee" which will add
instructions to trap into the kernel to do software assisted floating
point. The gcc flag and kernel support are optional. If the program
was not compiled with "-mieee" and/or kernel support is not enabled,
then there will be a floating-point exception if the program tries to
make use of an un-implemented feature.

For the curious, here is some documentation I've written about the subject:
http://www.gentoo.org/proj/en/base/alpha/doc/alpha-porting-guide.xml#doc_chap4

There is an instruction, implver, that can tell if the system is EV6
or higher. However, I'm wondering what should be done in libjit on
systems that do not have IEEE floating point. Someone could want no
software assistance (increased speed), but most people will want
software assistance. Should I make software assistance the default for
systems without hardware support (for example, call implver at runtime
and use software assistance on older systems), or should I determine
if libjit is being compiled with "-mieee" (gcc defines _IEEE_FP) and
enable software assistance if "-mieee" was enabled?

-Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]