From effdfb64a50216d4bbf8f7ebee629b43449849c9 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 22 Jul 2010 23:12:37 +0000 Subject: [PATCH] Relax plausible_cc_block_p. Some leaf procedures and continuations do not have GC trap prefixes, so don't require the block in question to have one. On i386, this makes the trap handler successfully figure out where it is in (FIX:QUOTIENT 1 0). FIX:QUOTIENT is a leaf procedure, unlike FLO:/, although perhaps FIX:QUOTIENT ought to do checks and defer to the microcode primitive like FLO:/. --- src/microcode/cmpint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/microcode/cmpint.c b/src/microcode/cmpint.c index 6b840865b..7eea4d298 100644 --- a/src/microcode/cmpint.c +++ b/src/microcode/cmpint.c @@ -1691,11 +1691,11 @@ plausible_cc_block_p (SCHEME_OBJECT * block) if ((read_cc_entry_type ((&cet), entry)) || ((cet.marker) != CET_EXPRESSION)) { - entry += CC_ENTRY_GC_TRAP_SIZE; - if ((read_cc_entry_type ((&cet), entry)) - || (! (((cet.marker) == CET_PROCEDURE) - || ((cet.marker) == CET_CONTINUATION)))) - return (0); + insn_t * real_entry = (entry + CC_ENTRY_GC_TRAP_SIZE); + if ((! (read_cc_entry_type ((&cet), real_entry))) + && (((cet.marker) == CET_PROCEDURE) + || ((cet.marker) == CET_CONTINUATION))) + entry = real_entry; } } { -- 2.25.1