-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Allow the disasm output on xarch to do less work for the common path #117097
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
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
1eb7c48 to
f9b7a9b
Compare
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.
Pull Request Overview
This PR refactors the disassembly output path for x86 instructions by precomputing pseudo-names for instructions, reducing unnecessary string copying in the common VEX path and simplifying the legacy hardware fallback.
- Introduces a new flag (INS_FLAGS_HasPseudoName) in the instruction flags.
- Updates display name generation in instr.cpp to remove redundant prefix operations.
- Refactors checks for pseudo-names in emitxarch.cpp and exposes the helper via codegeninterface.h.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/jit/instr.h | Added a new flag to mark instructions with a pseudo display name. |
| src/coreclr/jit/instr.cpp | Refactored display name functions with new lambdas and logic. |
| src/coreclr/jit/emitxarch.cpp | Simplified dispatch for instructions with pseudo names. |
| src/coreclr/jit/codegeninterface.h | Declared the new instHasPseudoName helper. |
|
CC. @dotnet/jit-contrib, small refactoring to make the instruction name fixups easier to understand and maintain. Reduces the amount of string copying for a typical jit disasm output by a decent amount as well. |
Most hardware we run on is currently VEX capable and we can spend a decent amount of time simply copying the instruction names into a temporary buffer just to add the
vprefix.This cleans that up by defaulting the instruction tables to have the
vprefixed name already and to instead simply return that + 1 in the case we're in a legacy hardware scenario.It also makes it easier to add instructions with pseudo names in the future.