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
x64Emitter: optimize immediate sizes #754
Conversation
| // Try to save immediate size if we can | ||
| if (nops[op].simm8 != 0xCC && | ||
| ((operand.scale == SCALE_IMM16 && (s16)operand.offset == (s8)operand.offset) || | ||
| (operand.scale == SCALE_IMM32 && (s32)operand.offset == (s8)operand.offset))) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
A nice alternative than trying to do it throughout the JIT.
|
lgtm |
|
lgtm, however considering #749, it looks like jit statements may be implicitly written as a shorter form than the writer of a jit statement expects...? Not sure if that's an issue or not. |
|
Could that ever be a bad thing? I think most assemblers already do that internally -- is there some place we want longer forms? |
|
It depends if anyone has written jit code with presumptions about On Tue, Aug 12, 2014 at 2:07 PM, Fiora notifications@github.com wrote:
|
|
That sounds like it'd be really dangerous, since it'd depend on whether an instruction had a REX prefix or not |
x64Emitter: optimize immediate sizes
|
FYI I know that some of the backpatch stuff has/had assumptions of On Tue, Aug 12, 2014 at 2:19 PM, shuffle2 notifications@github.com wrote:
Pierre "delroth" Bourdon delroth@gmail.com |
|
I think it should be okay; the backpatch code doesn't seem to use immediates at all, and it already has a check to make sure the size of the code is sufficient (it inserts nops otherwise). |
A nice alternative than trying to do it throughout the JIT.