Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New stack ops

4 views
Skip to first unread message

Dan Sugalski

unread,
Apr 15, 2003, 2:47:11 PM4/15/03
to perl6-i...@perl.org
Okay, in an attempt to get back to doing things after getting so
blocked with the object stuff, I've started adding some of the
utility ops we've been missing.

This time, the halfpop[insp] ops are in. These ops pop off a frame of
saved registers, but only restore registers 16-31. The chunk of the
frame for registers 0-15 is discarded.

Given that the calling conventions mandate things only in registers
0-15, this should (hopefully) make function/sub/method calls a bit
easier to deal with.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Simon Glover

unread,
Apr 17, 2003, 1:51:53 PM4/17/03
to Dan Sugalski, perl6-i...@perl.org

This code:

---------------------

set S15, "A"
set S16, "B"

pushs
set S15, "C"
set S16, "D"

print S15
print S16
print "\n"

halfpops

print S15
print S16
print "\n"

end

----------------

currently prints:

CD
C

when I'd expect it to print:

CD
CB

Is my expectation wrong, or is this a bug?

Simon

Dan Sugalski

unread,
Apr 17, 2003, 2:56:17 PM4/17/03
to Simon Glover, perl6-i...@perl.org

Bug, apparently. I'll go poke around and see what's going on. I'm
presuming I messed up the offset math or something so the restore's
not being done properly.

0 new messages