mes/module
Jan (janneke) Nieuwenhuizen 93b094f706
DRAFT mescc: Only use signed division when numerator is signed.
XXX TODO: We are getting stray nondeterministic floating point
exceptions when compiling mes using mescc with an m2-planet-compiled
mes: recompilation often succeeds.

I am suspecting using signed division: CLTD / IDIV is the problem,
which were enabled here

    fa4147a284
    mescc: Use signed division for x86, x86_64 when appropriate.

before, we never used signed division.  This patch fixed

    lib/tests/scaffold/36-compare-arithmetic.c
    lib/tests/scaffold/36-compare-arithmetic-negative.c

As a workaround, I have been avoiding using signed division, however,
signed division should work just fine.

Currently, sign-extension (CLTD vs XOR EDX) and signed division (IDIV vs
DIV) selected by setting "signed?".  See, module/mescc/x86/as.scm.
Possibly we need a signed? based on numerator and denominator, and
add a extend-sign? based on the signedness of the numerator?

* module/mescc/compile.scm (expr->register): Base "signed?" strictly on
signedness of numerator.
2021-01-01 11:02:01 +01:00
..
mes core: Remove core:make-cell. 2020-12-31 14:00:28 +01:00
mescc DRAFT mescc: Only use signed division when numerator is signed. 2021-01-01 11:02:01 +01:00
mescc.scm mescc: Change --align to --align=functions, --align=globals. 2020-12-29 14:24:29 +01:00