I have searched on the net, but i couldn’t find a clear example to understand what does this instruction do. So, if someone can give an example about this, it will be very helpful to me.
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.
Move with sign extend from byte to longword. In Intel syntax, the mnemonic of this instruction is MOVSX.
A C compiler may use this instruction when a variable of type
int8_tneeds to be converted toint, which happens automatically on arithmetic and a few other operations (integer promotion).Because this instruction writes to all 32 (or 64) bits of the destination register, it avoids performance penalties that may result from writing to only the low 8 (or 16) bits of a register. A similar set of instructions allows extending with zero bits (MOVZX in Intel syntax, MOVZst in AT&T syntax (from size s to size t)).