Does ADD EAX, EBX put to zero the 32 high-order bits of EAX if I just operate on the 32 low bits?
And what about ADD RAX, EBX? Is it possible? And if it is, are the 32 high-order bits of RAX preserved?
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.
ADD EAX, EBXzeros the high 32 bits of RAX.ADD RAX, EBXis not a valid instruction.It sounds like you want to add a 32-bit value in
EBXto a 64-bit value inRAX. To do this, first you either zero-extend (MOV EBX, EBX) or sign-extend (MOVSX RBX, EBX), then addRBXtoRAX. (Use zero-extension if you are interpreting the value inEBXas unsigned, sign-extension if it is signed).