-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing assembly instructions to the x86 backend #20050
base: master
Are you sure you want to change the base?
Conversation
Added `cmc`, `clc`, `stc`, `cli`, `sti`, `cld` and `std`
Add support for the `sysret` instruction for the x86_64 self-hosted backend
It would be a good idea to add the |
That's true, |
Probably also some instructions related to |
The thing is, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the CI does not run any tests in src
, and the tests added in this PR do not pass as many of the added encodings are wrong. If you prefer, you can make these changes upstream first where the CI does run the tests. Also note that without Mir encodings most of these instructions will not be usable in inline asm, which should have been obvious if any amount of testing had been done before creating this PR. I'm afraid making these kind of changes requires a lot of attention to detail to get right.
@jacobly0 I'm sorry, I missed the Mir. I will set the PR as a draft for now, in case someone wants to address the linked issue while I work on it. Thanks for mentioning the upstream. |
See |
The x86 backend was missing some important instructions. They're not generated by the compiler, but having them ensures they can be used in inline assembly. Added tests for all of them. Control registers were also added. A list of added instructions:
rdmsr
wrmsr
sysret
cmc
clc
stc
cli
sti
cld
std
int1
int
iret
hlt
Fixes #19773