Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

New stack ops

已查看 4 次
跳至第一个未读帖子

Dan Sugalski

未读,
2003年4月15日 14:47:112003/4/15
收件人 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

未读,
2003年4月17日 13:51:532003/4/17
收件人 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

未读,
2003年4月17日 14:56:172003/4/17
收件人 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 个新帖子