At my 64bit Intel machine following code works:
mov rdi, 1 << 40
add r10, rdi
and this quite equivalent looking one produces a warning and doesn't work:
add r10, 1 << 40
Should I just stick with number 1 or am I missing something? This behaviour seems akward.
The warning produced by code nr 2:
warning: signed dword immediate exceeds bounds
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…