diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-09-01 20:36:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 20:36:47 (GMT) |
commit | 4c72517cada147b215cf30ff8dac70ea0f08f1e0 (patch) | |
tree | 1012522409ed719a8d8ba0b5eab4e5f3bce77bd6 /Misc | |
parent | a91f25577c71ab8797a4b42f22c43bbaffc2604d (diff) | |
download | cpython-4c72517cada147b215cf30ff8dac70ea0f08f1e0.zip cpython-4c72517cada147b215cf30ff8dac70ea0f08f1e0.tar.gz cpython-4c72517cada147b215cf30ff8dac70ea0f08f1e0.tar.bz2 |
gh-93554: Conditional jump opcodes only jump forward (GH-96318)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-08-26-18-46-32.gh-issue-93554.QEaCcK.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-08-26-18-46-32.gh-issue-93554.QEaCcK.rst b/Misc/NEWS.d/next/Core and Builtins/2022-08-26-18-46-32.gh-issue-93554.QEaCcK.rst new file mode 100644 index 0000000..dff12ae --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-08-26-18-46-32.gh-issue-93554.QEaCcK.rst @@ -0,0 +1,16 @@ +Change the jump opcodes so that all conditional jumps are forward jumps. +Backward jumps are converted by the assembler into a conditional forward +jump whose target is the fallthrough block (and with a reversed condition), +followed by an unconditional backward jump. For example: + +``POP_JUMP_IF_TRUE BACKWARD_TARGET`` becomes ``POP_JUMP_IF_FALSE NEXT_BLOCK; +JUMP BACKWARD_TARGET``. + +All the directed conditional jump opcodes were removed: +``POP_JUMP_FORWARD_IF_TRUE``, ``POP_JUMP_BACKWARD_IF_TRUE``, +``POP_JUMP_FORWARD_IF_FALSE``, ``POP_JUMP_BACKWARD_IF_FALSE``, +``POP_JUMP_FORWARD_IF_NONE``, ``POP_JUMP_BACKWARD_IF_NONE``, +``POP_JUMP_FORWARD_IF_NOT_NONE``, ``POP_JUMP_BACKWARD_IF_NOT_NONE``. + +The corresponding opcodes without direction are no longer pseudo-instructions, +and they implement the forward conditional jumps. |