Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 606 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between long and short jump (x86)

#1
I've read that short jumps are to be used when **the relative jump is less than 124 in address**, and long jumps should be used otherwise.

What is the difference in terms of *operations performed in the CPU / performance* between the two types of jumps on x86?
Reply

#2
There are actually three types of `JMP` instructions; short, near and far (long).

A short `JMP` is the relative `JMP` that you refer to. It is encoded as a two bytes; the actual `JMP` and the number of bytes +/- relative to the current IP.

A near jump allows you to jump within the current "segment" (using real mode terms) or within the currently selected memory area in the CS selector.

A long or Far `JMP` additionally includes a selector (or segment in real mode)

You can look up the timings for yourself. The biggest difference related to time is caused by the different numbers of bytes that must be read to accomplish the `JMP`.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through