GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755)

This commit is contained in:
Mark Shannon 2023-10-12 10:34:32 +01:00 committed by GitHub
parent fb7843ee89
commit 19b7ead5eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 59 deletions

View file

@ -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():
if not part.instr.is_viable_uop() and part.instr.name != "_SAVE_CURRENT_IP":
# 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 == "_SET_IP":
size, offset = OPARG_SIZES["OPARG_SET_IP"], cache_offset
if part.instr.name == "_SAVE_CURRENT_IP":
size, offset = OPARG_SIZES["OPARG_SET_IP"], cache_offset - 1
else:
size, offset = OPARG_SIZES["OPARG_FULL"], 0
else: