gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095)

This commit is contained in:
Irit Katriel 2023-10-26 14:43:10 +01:00 committed by GitHub
parent 573eff3e2e
commit 67a91f78e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 249 additions and 164 deletions

View file

@ -67,7 +67,7 @@
"OPARG_CACHE_4": 4,
"OPARG_TOP": 5,
"OPARG_BOTTOM": 6,
"OPARG_SET_IP": 7,
"OPARG_SAVE_RETURN_OFFSET": 7,
}
INSTR_FMT_PREFIX = "INSTR_FMT_"
@ -658,7 +658,7 @@ def write_macro_expansions(
for part in parts:
if isinstance(part, Component):
# All component instructions must be viable uops
if not part.instr.is_viable_uop() and part.instr.name != "_SAVE_CURRENT_IP":
if not part.instr.is_viable_uop():
# This note just reminds us about macros that cannot
# be expanded to Tier 2 uops. It is not an error.
# It is sometimes emitted for macros that have a
@ -671,8 +671,8 @@ def write_macro_expansions(
)
return
if not part.active_caches:
if part.instr.name == "_SAVE_CURRENT_IP":
size, offset = OPARG_SIZES["OPARG_SET_IP"], cache_offset - 1
if part.instr.name == "_SAVE_RETURN_OFFSET":
size, offset = OPARG_SIZES["OPARG_SAVE_RETURN_OFFSET"], cache_offset
else:
size, offset = OPARG_SIZES["OPARG_FULL"], 0
else: