How to replace _asm nop instructions in 64-bit. compiles and works in 32-bit.
How to replace _asm nop instructions in 64-bit. compiles and works in 32-bit.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe that you can use the __nop intrinsic function. This should compile into the appropriate machine instruction for the processor that you are building.
http://msdn.microsoft.com/en-us/library/aa983381(VS.80).aspx
UPDATE:
Here is an example that I just created with VS2008. It compiles for both Win32 and x64 configurations:
In case you are wondering, I disassembled the above example and the x64 output was:
The Win32 output was: