[M3commit] [modula3/cm3] 0a1cad: Fix two problems found by m3-libs/m3core/src/floa...

GitHub noreply at github.com
Tue Jul 26 09:34:21 CEST 2016


  Branch: refs/heads/master
  Home:   https://github.com/modula3/cm3
  Commit: 0a1cadc9ebc6ec223d58582ace43408e7a51c49c
      https://github.com/modula3/cm3/commit/0a1cadc9ebc6ec223d58582ace43408e7a51c49c
  Author: Jay Krell <jay.krell at cornell.edu>
  Date:   2016-07-26 (Tue, 26 Jul 2016)

  Changed paths:
    M m3-sys/m3back/src/M3x86.m3
    M m3-sys/m3back/src/Stackx86.m3

  Log Message:
  -----------
   Fix two problems found by m3-libs/m3core/src/float/Common/grisu/Grisu.m3:
 1.
   VAR a,b: LONGINT;
  F(a * b);

 Generates an internal/helper function call while
 generating another call.

 Previously we could only build up one parameter list a at a time.

 Constructs like:
   VAR: a,b,c,d: INTEGER:
    F(G(a*b), c*d);

 get unwrapped by the frontend into:
  temp1 := G(a*b);
  temp2 := F(temp1, c*d);

 But NOT:
  temp1 := a*b:
  temp2 := G(temp1);
  temp3 := c*d;
  temp4 := F(temp2, temp3);

 which would be nice and also address that.

 Fix the NT386 backend to maintain a stack of calls being built
 to handle that.

 2. LOOPHOLEing to a floating point type asserted
   that it was to Type.Reel.

  This made good historical sense when the internal
  stack was of single words. It became insufficient
  when the stack was optionally widended to double words
  for LONGINT. So now assert just that the size
  isn't changing when converting between floats and non-floats
  (non-float is typicall integer, but could be pointer).

There is still unsolved:

new opaque info -> recompiling StubGenTool.m3
 -> linking shobjcodegen.exe

***
*** runtime error:
***    <*ASSERT*> failed.
***    file "..\src\float\Common\grisu\IEEE.m3", line 155
***

 seconds  #times  operation
Stack trace:
   FP         PC      Procedure
---------  ---------  -------------------------------
 0x1ef540  0x14f52cd  AsNormalizedGFP_D + 0x4b in ..\src\float\Common\grisu\IEEE
.m3
 0x1ef5bc  0x14e718f  Grisu3 + 0xa7 in ..\src\float\Common\grisu\Grisu.m3
 0x1ef608  0x14e7810  FastDtoa + 0xf9 in ..\src\float\Common\grisu\Grisu.m3
 0x1ef698  0x14d43fa  ToDecimal + 0x114 in ..\src\float\IEEE\LongFloat.m3
 0x1ef708  0x147cc29  LongReal + 0x42 in ..\src\fmtlex\Fmt.m3
 0x1ef730  0x147f94d  FmtTime + 0x27 in ..\src\etimer\ETimer.m3
 0x1ef7a8  0x147f6c5  Dump + 0x242 in ..\src\etimer\ETimer.m3
 0x1ef7c4  0x1444fb2  Stop + 0xa6 in ..\src\M3Timers.m3
 0x1ef858  0x1214de0  CleanUp + 0x137 in ..\src\Main.m3
 0x1ef874  0x14ae0a0  InvokeExitors + 0x46 in ..\src\runtime\common\RTProcess.m3

.........  .........  ... more frames ...

 - Jay




More information about the M3commit mailing list