fix the actual result value for unboxed flmin and flmax

svn: r18045
This commit is contained in:
Matthew Flatt 2010-02-11 04:00:18 +00:00
parent bdae105baf
commit 38a0f6d89a
2 changed files with 14 additions and 4 deletions

View File

@ -420,6 +420,8 @@
(tri 5 'min (lambda () 20) 10 5 void)
(bin-exact 3.0 'flmin 3.0 4.5)
(bin-exact 2.5 'flmin 3.0 2.5)
(bin0 3.5 '(lambda (x y) (fl+ 1.0 (flmin x y))) 3.0 2.5)
(bin0 4.0 '(lambda (x y) (fl+ 1.0 (flmin x y))) 3.0 4.5)
(bin-exact 30 'fxmin 30 45)
(bin-exact 25 'fxmin 30 25)
@ -431,6 +433,8 @@
(tri 50 'max (lambda () 20) 10 50 void)
(bin-exact 4.5 'flmax 3.0 4.5)
(bin-exact 3.0 'flmax 3.0 2.5)
(bin0 5.5 '(lambda (x y) (fl+ 1.0 (flmax x y))) 3.0 4.5)
(bin0 4.0 '(lambda (x y) (fl+ 1.0 (flmax x y))) 3.0 2.5)
(bin-exact 45 'fxmax 30 45)
(bin-exact 30 'fxmax 30 25)

View File

@ -4709,13 +4709,19 @@ static int generate_double_arith(mz_jit_state *jitter, Scheme_Object *rator,
mz_rs_sync(); /* needed if arguments were unboxed */
generate_alloc_double(jitter, 0);
CHECK_LIMIT();
#if defined(MZ_USE_JIT_I386)
if (need_post_pop)
FSTPr(0);
#endif
} else if (unboxed_result) {
jitter->unbox_depth++;
}
#if defined(MZ_USE_JIT_I386)
if (need_post_pop)
FSTPr(0);
#if defined(MZ_USE_JIT_I386)
if (need_post_pop) {
FXCHr(1);
FSTPr(0);
}
#endif
}
} else {
/* The "anti" variants below invert the branch. Unlike the "un"
variants, the "anti" variants invert the comparison result