The MASM Forum

64 bit assembler => 64 bit assembler. Conceptual Issues => Topic started by: Jokaste on November 03, 2017, 01:32:48 AM

Title: Align JUMPS and JCC
Post by: Jokaste on November 03, 2017, 01:32:48 AM
In my programs the procedures are 16 bytes aligned.
Do I also have to align  the JMPs and the Jcond on a 16 bytes boundary?

Title: Re: Align JUMPS and JCC
Post by: hutch-- on November 03, 2017, 01:38:41 AM
Nope !
Title: Re: Align JUMPS and JCC
Post by: dedndave on November 04, 2017, 12:57:43 AM
i think a lot depends on which processor is running the code

on my P4, short branch targets need not be aligned
but, it helps to align long targets

there are short and long (near) types of JMP's and Jcc's, only far JMP's
calls are either near or far, never short
Title: Re: Align JUMPS and JCC
Post by: Jokaste on November 04, 2017, 03:45:44 AM
On my AMD it seems that when JMP and Jcc are aligned it is quicker.
It's easy to say, I have nothing to test.