-
Notifications
You must be signed in to change notification settings - Fork 22
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
Look like incorrect result in assembling push numeric value in intel assembler #330
Comments
This behavior is 100% correct, as 080h is a positive value which cannot be encoded using imm8. So, if you'd like to get
|
this push do 16 bit push on 32 bit system. how to use |
So, please correct me if I'm wrong, because I'm not sure if I understand the problem. Would you like to have the first instruction to be marked as the one chosen by the assembler as the preferred one? Something like this:
|
All options in assembler or in command line tool set flags to use 32 bit code if in sample assembler code
as result some push commands will change esp to value 4, and some push commands if var == 0x80 will change esp to 2 bytes. i think 32 bit code in push commands must always change esp to 4 bytes? |
Yes, I think that it makes perfect sense, the instruction generated for the default 32-bit operand size should be the one preferred here. I'll extend the instruction chooser to respect such cases. |
#330 Prefer instructions which don't override ASA and OSA over the shortest ones.
The fix has been merged with master, 1.3.0 will be released soon. |
command from example dir:
./fcml_asm -asa32 -osa32 -m32 "push 80h"
Return this:
But
666a80
look like wrong.This is bug? or exists way to give to push information about argument size?
The text was updated successfully, but these errors were encountered: