Try OpCode FF /2: https://www.felixcloutier.com/x86/call
That seems to be a 64 bit near call.
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Beosar said:
Try OpCode FF /2: https://www.felixcloutier.com/x86/call
Yes, thats what I've been doing originally. But it requires using a separate MOV into the rax-register, which makes the code a bit worse to decypher (which I currently really need to be able to) and it also uses an indirect call which has the potential to be slower.
Oh, sorry. So, basically you are generating code and storing it in memory on the heap. I don't think there is a guarantee that the address is within range of your program's code. It may work on one OS on one machine but not on another. You could potentially copy the program's code to the heap and then put the JIT compiled code directly after that, then it would definitely be in range (unless your program gets very large).