A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/078102.html below:

[Python-Dev] Two questions about jump opcodes

[Python-Dev] Two questions about jump opcodes [Python-Dev] Two questions about jump opcodesAntoine Pitrou solipsis at pitrou.net
Sat Mar 22 23:43:31 CET 2008
Hi,

I'm attempting some bytecode tweaks (see http://bugs.python.org/issue2459) and
I've got two questions about jump instructions:

- Why are there both relative and absolute jump instructions? The traditional
rationale for relative jumps (apart from position-independent code) is to allow
for shorter operand sizes; but Python opcodes all have the same operand size
(and 16 bits is more than enough to address most bytecode arrays).
- Why are relative jumps unsigned? This means they can only jump forward, and as
soon as you want to jump backward you have to switch to an absolute jump...

(in that regard, I don't understand what JUMP_FORWARD can possibly bring over
JUMP_ABSOLUTE)

Thanks for your kind answers

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4