[M3devel] NT386 longint=64bits

Jay K jay.krell at cornell.edu
Sun Feb 7 16:12:13 CET 2010


LONGINT on NT386 is now 64bits.

 

 

It could use more testing.

 See m3-sys\m3tests\src\p2\p227.

  Add more there. Try it on NT386 and others. Disassemble the output (or use cm3 -debug

  and look at the *log (not *.log) files in the output directory, very useful).

  It doesn't run in the automated runs though, yet.

 

 

There are two known problems:

  converting between INTEGER and LONGINT doesn't sign extend 

    I'm not sure if LONGINT to INTEGER range checks either. In fact I didn't

      test any of the range checking, but it layers on top of simple compares.

 

 

  You cannot initialize a global LONGINT to other than 0; this bug is on all platforms.

   I'm hoping Tony fixes that.

   I think I need to make a change in m3back for this too though, to use

   the change I put in m3objfile (append vs. appendBytes).   

 

 

It'd be nifty if the front end could deal with the conversion.

Generate the compares to 0, oring with FFFFFFFF00000...

But I'll get to before too long either way.

 

 

There are also obvious missing optimizations, some of which

are easily fixed, some are not. In particular, some of the

code is in the "wrong" place, such as to miss out on constant folding.

Including division by constants.

The fix is just to move the code later after constant cases are handled.

I'll get to this stuff before too long.

 

 

There are a few "support" functions.

For example 64bit multiply calls out to a function.

  If you do a 64bit multiply in C, that calls a function too.

  We call the same function, where applicable.

  And m3core/src/Csupport/Common/hand.c has a few functions.

  I'm particularly nervous about extract/insert, but they seem to work.

 

 

If you find a problem and really must go back to 32bit LONGINT, see the

change below in Target.m3. Maybe make it a command line option.

 

 

 - Jay


 
> Date: Sun, 7 Feb 2010 16:02:32 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
> 
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 10/02/07 16:02:32
> 
> Modified files:
> cm3/m3-sys/m3middle/src/: Target.m3 
> 
> Log message:
> and bang: longint is now 64bits on NT386
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100207/a596db96/attachment-0001.html>


More information about the M3devel mailing list