Skip to content

Conversation

@ivg
Copy link
Member

@ivg ivg commented Feb 27, 2025

Occasionally, llvm refines their instruction definitions and change the number of operands, for example this commit added an extra destination register operand. For the old lifters we used a pretty strict rules for operands deconstructing and for the bts, btc, and btr instructions we were expecting two operands (now there are three of them).

I decided to relax the deconstructor instead of changing the definition of instructions, first to preserve backward compatibility with the older versions of llvm and second because many other instructions could be affected by the same changes from the llvm side, and I don't see any harm if we will accept instructions with one more argument, knowing that destinations are always prepended.

ivg added 2 commits February 27, 2025 21:46
Some were deprecated, some removed, and other just failing.
Occasionally, llvm refines their instruction definitions and change
the number of operands, for example this [commit][1] added an extra
destination register operand. For the old lifters we used a pretty
strict rules for operands deconstructing and for the bts, btc, and btr
instructions we were expecting two operands (now there are three of
them).

I decided to relax the deconstructor instead of changing the
definition of instructions, first to preserve backward compatibility
with the older versions of llvm and second because many other
instructions could be affected by the same changes from the llvm side,
and I don't see any harm if we will accept instructions with one more
argument, knowing that destinations are always prepended.

[1]: llvm/llvm-project@fe96ff7
@ivg ivg force-pushed the relaxes-rr-ri-for-btc-et-al branch from 90c808c to 8d3d83e Compare February 27, 2025 21:47
@ivg
Copy link
Member Author

ivg commented Feb 28, 2025

I am going to merge this and later investigate the issue with failing opam installation.

@ivg ivg merged commit 0ff8147 into master Feb 28, 2025
2 of 10 checks passed
@ivg ivg deleted the relaxes-rr-ri-for-btc-et-al branch February 28, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants