
Signature
Yao Qi <qiyaoltc@gmail.com> GNU/Linux Developer
http://duewayqi.googlepages.com/
Yevtushenko has... an ego that can crack crystal at a distance of twenty feet.
-- John Cheever
> top--> +--------+
> | long |
long is two entries. This is the real problem, as swap wont work as
intended. (Not a popular piece of byte code design, but presumably a bit
easier for interpreters on 32-bit systems.)
> +--------+
> | Object |
[quoted text clipped - 13 lines]
> +--------+
> | ... |
So you have
..., C, B, A
where A and B are the long and C the reference, and you want
..., C, C, B, A, C
The trick is to use dup_x and then discard unwanted values.
So
..., C, B, A
dup2_x1
..., B, A, C, B, A
pop2
..., B, A, C
dup_x2
..., C, B, A, C
dup_x2
..., C, C, B, A, C
I think. (And make sure you set the max frame size appropriately.)
If you are writing code from scratch, then local variables are very
useful. Probably not so convenient for instrumentation.
Tom Hawtin