I have a question about jumping in assembly. Is it necessary for a function label to be aligned at an 8-BYTE boundary when we want to jump to it?
For example:
func:
jmp .ret1
.ret1: mov eax, 1
ret
.ret2: mov eax, 2
ret
Here I have a function with 2 labels and I just jumped to the first one. Is it necessary for each label to be aligned at an 8-BYTE boundary?
Is the following necessary:
func:
jmp .ret1
ALIGN 8
.ret1: mov eax, 1
ret
ALIGN 8
.ret2: mov eax, 2
ret
What about functions? Each function must be aligned at an 8-BYTE boundary or is it not important?