assembly - Difference between long and short jump (x86) -
i've read short jumps used when the relative jump less 124 in address, , long jumps should used otherwise.
what difference in terms of operations performed in cpu / performance between 2 types of jumps on x86?
there 3 types of jmp
instructions; short, near , far (long).
a short jmp
relative jmp
refer to. encoded 2 bytes; actual jmp
, number of bytes +/- relative current ip.
a near jump allows jump within current "segment" (using real mode terms) or within selected memory area in cs selector.
a long or far jmp
additionally includes selector (or segment in real mode)
you can timings yourself. biggest difference related time caused different numbers of bytes must read accomplish jmp
.
Comments
Post a Comment