Is the cltq
its own instruction, or is it an alias for something else? I couldn't find it on the x86 page. As it does:
cltq # fill high 32 bits with 1 if current (eax) MSB is 1 else 0
# movslq %eax, %rax
Are there other 'forms' of it, so that it can work on other byte-sizes or registers or does it only work on the accumulator register? If it's always fixed to that, why would it be so common to fix it to that? My only thought is if the return value is an int
in C and its common to cast that to a long
, but this is merely just a random guess.