GH-113710: Improve _SET_IP and _CHECK_VALIDITY (GH-115248)

This commit is contained in:
Mark Shannon 2024-02-13 16:28:19 +00:00 committed by GitHub
parent de07941729
commit 681778c56a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 79 additions and 35 deletions

View file

@ -432,9 +432,8 @@ translate_bytecode_to_trace(
top: // Jump here after _PUSH_FRAME or likely branches
for (;;) {
target = INSTR_IP(instr, code);
RESERVE_RAW(3, "epilogue"); // Always need space for _SET_IP, _CHECK_VALIDITY and _EXIT_TRACE
ADD_TO_TRACE(_SET_IP, target, 0, target);
ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target);
RESERVE_RAW(2, "epilogue"); // Always need space for _SET_IP, _CHECK_VALIDITY and _EXIT_TRACE
ADD_TO_TRACE(_CHECK_VALIDITY_AND_SET_IP, 0, (uintptr_t)instr, target);
uint32_t opcode = instr->op.code;
uint32_t oparg = instr->op.arg;