mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-112354: _GUARD_IS_TRUE_POP
side-exits to target the next instruction, not themselves. (GH-114078)
This commit is contained in:
parent
2010d45327
commit
ac10947ba7
8 changed files with 40 additions and 26 deletions
|
@ -481,18 +481,19 @@ top: // Jump here after _PUSH_FRAME or likely branches
|
|||
goto done;
|
||||
}
|
||||
uint32_t uopcode = BRANCH_TO_GUARD[opcode - POP_JUMP_IF_FALSE][jump_likely];
|
||||
_Py_CODEUNIT *next_instr = instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[opcode]];
|
||||
DPRINTF(2, "%s(%d): counter=%x, bitcount=%d, likely=%d, confidence=%d, uopcode=%s\n",
|
||||
_PyOpcode_OpName[opcode], oparg,
|
||||
counter, bitcount, jump_likely, confidence, _PyUOpName(uopcode));
|
||||
ADD_TO_TRACE(uopcode, max_length, 0, target);
|
||||
_Py_CODEUNIT *next_instr = instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[opcode]];
|
||||
_Py_CODEUNIT *target_instr = next_instr + oparg;
|
||||
if (jump_likely) {
|
||||
_Py_CODEUNIT *target_instr = next_instr + oparg;
|
||||
DPRINTF(2, "Jump likely (%x = %d bits), continue at byte offset %d\n",
|
||||
instr[1].cache, bitcount, 2 * INSTR_IP(target_instr, code));
|
||||
instr = target_instr;
|
||||
ADD_TO_TRACE(uopcode, max_length, 0, INSTR_IP(next_instr, code));
|
||||
goto top;
|
||||
}
|
||||
ADD_TO_TRACE(uopcode, max_length, 0, INSTR_IP(target_instr, code));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue