Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a new jit

Tags:

c++

assembly

jit

I'm interested in starting my own JIT project in C++. I'm not that unfamiliar with assembly, or compiler design etc etc. But, I am very unfamiliar with the resulting machine code format - like, what does a mov instruction actually look like when all is said and done and it's time to call that function pointer. So, what are the best resources for creating such a thing?

Edit: Right now, I'm only interested in x86 on Windows, stretching a tiny bit to 64bit Windows in the future.

like image 787
Puppy Avatar asked Sep 01 '25 10:09

Puppy


1 Answers

You want to have a look at the processor manuals for the architecture you are interested in. Those manuals describe the opcode encoding. For x86 processors, the manuals can be downloaded from this page.

like image 182
Thomas Pornin Avatar answered Sep 03 '25 03:09

Thomas Pornin