~ chicken-core (chicken-5) 50868290c0905a4c7bf35204435ed99bdb3bbb5a
commit 50868290c0905a4c7bf35204435ed99bdb3bbb5a
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Sep 5 16:24:12 2010 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sun Sep 5 16:24:12 2010 +0200
added comment about SIGFPE problem
diff --git a/runtime.c b/runtime.c
index 54494a26..45e1822e 100644
--- a/runtime.c
+++ b/runtime.c
@@ -8616,7 +8616,7 @@ C_regparm C_word C_fcall C_i_o_fixnum_difference(C_word n1, C_word n2)
C_regparm C_word C_fcall C_i_o_fixnum_times(C_word n1, C_word n2)
{
C_word x1, x2;
- /* otherwise gcc tries to be smart (and naturally fails) */
+ /* otherwise gcc tries to be smart in constant-folding and screws up the signs */
#ifdef C_SIXTY_FOUR
static int seven_f = 0x7fffffffffffffff;
static int eight_0 = 0x8000000000000000;
@@ -8636,6 +8636,7 @@ C_regparm C_word C_fcall C_i_o_fixnum_times(C_word n1, C_word n2)
else goto ok;
}
else {
+ /*XXX gives SIGFPE on x86 with x2 == -1 */
if(x2 < (eight_0 / x2)) return C_SCHEME_FALSE;
else goto ok;
}
Trap