classpath
[Top][All Lists]
Advanced

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

Re: Classpath build process and VM-specific issues


From: Steven Augart
Subject: Re: Classpath build process and VM-specific issues
Date: Tue, 06 Apr 2004 23:05:01 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Etienne Gagnon wrote:
> Can JNI actually be implemented on a 16-bit per byte system?
> Anybody has a reasonable answer?

Such a system, to implement JNI, will have to have a compiler-defined extension for a signed 8-bit byte type, a bit like the GNU "long long" extension. ANSI C allows a compiler to add additional types, as long as it implements the standard ones.

It will also need an unsigned 8 bit quantity (jboolean), signed and unsigned 16 bit ones (jshort, jchar), signed 32 and 64 bit quantities (jint, jlong), and (the stinger) 32 bit and 64 bit floating point values (jfloat, jdouble).

Now, I'm not sure how many people who use JNI are going to actually depend upon a jfloat being exactly 32 bits long (and not one bit more!) or a jdouble being exactly 64 bits long, but according to table 3-1 in the JNI spec they are indeed entitled to make that assumption. So, any C compiler that you want to write JNI code with had better have a way to specify floating point types with those lengths.


--
Steven Augart

Jikes RVM, a free, open source, Virtual Machine:
http://oss.software.ibm.com/jikesrvm




reply via email to

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