Skip to content

Commit d470ce9

Browse files
committed
gh-133171: Re-enable JUMP_BACKWARD to free-threading build
1 parent c25400a commit d470ce9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,9 +2940,10 @@ dummy_func(
29402940
};
29412941

29422942
tier1 op(_SPECIALIZE_JUMP_BACKWARD, (--)) {
2943-
#if ENABLE_SPECIALIZATION
2943+
#if ENABLE_SPECIALIZATION_FT
29442944
if (this_instr->op.code == JUMP_BACKWARD) {
2945-
this_instr->op.code = tstate->interp->jit ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;
2945+
uint8_t desired = tstate->interp->jit ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;
2946+
FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, desired);
29462947
// Need to re-dispatch so the warmup counter isn't off by one:
29472948
next_instr = this_instr;
29482949
DISPATCH_SAME_OPARG();

Python/generated_cases.c.h

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)