On Fri, Jun 7, 2013 at 10:33 PM, Alexis BRENON <abre...@wyplay.com> wrote:
> Hi,
>
> I see in the ARM tests many call to InstructionBuilder.curpos() which
> returns BlockBuilderMixin.get_relative_pos(). Then, the value returned is
> used to make some branches and some jumps.
> I try to do the same for my MIPS port, but all my branch and jump fail. When
> I print the value returned I get value under 1000 that let me think that
> it's not a PC value.
>
> Can anyone explain me what's the value returned by
> BlockBuilderMixin.get_relative_pos().

it's a relative pos to the start of the block and it's used for
relative jumps. if you want to do absolute jumps, you need to patch
them later using the value that's returned from materialize() (that
writes it to memory). At least x86 backend has some jump patching done

Cheers,
fijal
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to