[m-rev.] for review: fix asm_fast.par.gc
Peter Wang
wangp at students.cs.mu.OZ.AU
Wed Mar 8 18:20:48 AEDT 2006
On 2006-03-07, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > > >
> > > > Here's the list of failing tests on saturn. I think most of are failing
> > > > for other reasons (64-bitness, plus the copy of the testsuite used is a
> > > > bit more recent than the rest of my workspace).
> > > >
> > > > debugger/declarative/nodescend_tracking
> > > > hard_coded/integer_test
> > > > invalid/duplicate_instance_2
> > > >
> > >
> > > I'm not sure why those three are failing (although at a guess the last
> > > one may have something to do with Mark's change to the parser) - not
> > > sure about the other two though.
> >
> > I bootchecked it on saturn and none of those three failed. The list of
> > unexpected failures I got (at -O5) was:
> >
> > debugger/declarative/throw
> > general/string_format/string_format_d
> > general/string_format/string_format_o
> > general/string_format/string_format_u
> > general/string_format/string_format_x
> >
>
> They're the ones I would expect to fail - so it looks like the others
> are specific to the .par grades.
I've changed the fix a little. Now MR_ctxt_sp is set to be one word
before MR_zone_min when the context is initialised (analogous to what
happens for MR_ctxt_maxfr a few lines later). That makes the
MR_fork_new_context() code simpler, and maybe more correct.
Interdiff follows.
diff -u compiler/par_conj_gen.m compiler/par_conj_gen.m
--- compiler/par_conj_gen.m 6 Mar 2006 12:06:49 -0000
+++ compiler/par_conj_gen.m 7 Mar 2006 23:24:42 -0000
@@ -264,6 +264,8 @@
copy_outputs(CI, [Var | Vars], SpSlot, Code) :-
code_info__get_variable_slot(CI, Var, SrcSlot),
( SrcSlot = stackvar(SlotNum) ->
+ % The stack pointer points to the last used word on the stack.
+ % We want MR_sp[-0] = MR_sv(1), MR_sp[-1] = MR_sv(2), etc.
NegSlotNum = (1 - SlotNum),
DestSlot = field(yes(0), lval(SpSlot), const(int_const(NegSlotNum)))
;
diff -u runtime/mercury_context.h runtime/mercury_context.h
--- runtime/mercury_context.h 7 Mar 2006 06:15:00 -0000
+++ runtime/mercury_context.h 7 Mar 2006 23:19:01 -0000
@@ -283,11 +283,9 @@
fork_new_context_i > 0; \
fork_new_context_i--) \
{ \
- *(f_n_c_context->MR_ctxt_sp) = MR_stackvar(fork_new_context_i); \
f_n_c_context->MR_ctxt_sp++; \
+ *(f_n_c_context->MR_ctxt_sp) = MR_stackvar(fork_new_context_i); \
} \
- /* `MR_ctxt_sp' points to the last used word */ \
- f_n_c_context->MR_ctxt_sp--; \
f_n_c_context->MR_ctxt_resume = (child); \
MR_schedule(f_n_c_context); \
MR_GOTO(parent); \
only in patch2:
unchanged:
--- runtime/mercury_context.c 14 Sep 2005 06:57:32 -0000 1.42
+++ runtime/mercury_context.c 7 Mar 2006 23:18:54 -0000
@@ -109,7 +109,8 @@
0, MR_detstack_size, MR_next_offset(),
MR_detstack_zone_size, MR_default_handler);
}
- c->MR_ctxt_sp = c->MR_ctxt_detstack_zone->MR_zone_min;
+ /* sp points to the last used word, not to the first free word. */
+ c->MR_ctxt_sp = c->MR_ctxt_detstack_zone->MR_zone_min - 1;
if (c->MR_ctxt_nondetstack_zone != NULL) {
MR_reset_redzone(c->MR_ctxt_nondetstack_zone);
It does, however, break tests/debugger/nondet_stack. A sample of the
log follows. I think it's just a matter of adding another expected
output case to reflect that the stack pointer is one less than it was
before ?
** nondet_stack.out did not match the expected output
** (closest match was nondet_stack.res1)
*** nondet_stack.exp Mon Jan 17 16:58:08 2005
--- nondet_stack.out Wed Mar 8 17:11:48 2006
***************
*** 81,94 ****
non 14: temp
redoip: label UNKNOWN
redofr: non 10
! detfr: det 13
non 10: ordinary, 6 words
redoip: label global_fail
redofr: non 10
succip: label wrapper_not_reached
succfr: non 4
mdb> stack_regs
! sp = det 13
curfr = non 135
maxfr = non 135
mdb> nondet_stack -d
--- 81,94 ----
non 14: temp
redoip: label UNKNOWN
redofr: non 10
! detfr: det 12
non 10: ordinary, 6 words
redoip: label global_fail
redofr: non 10
succip: label wrapper_not_reached
succfr: non 4
mdb> stack_regs
! sp = det 12
curfr = non 135
maxfr = non 135
mdb> nondet_stack -d
[etc.]
Tabling seems to be broken in the .par grade, but didn't show up until I
rebootchecked with a fresh copy of the testsuite. Here are the failing
tests. Setting up the nightly tests would be good, but fib_list enters
into an infinite loop so it may need to be disabled for the time being.
tabling/expand_poly
tabling/expand_tuple
tabling/fib_list
tabling/specified
Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list