panraven Grandmaster Cheater Reputation: 55 Joined: 01 Oct 2008 Posts: 942
|
Posted: Sun Nov 22, 2020 1:12 pm Post subject: custom_jump_call_assembler_with_trampoline |
|
|
Script here
https://pastebin.com/ifrYmpmp
Handle following assembler instruction, to enhance control of immediate jump target (ie. no indirect or register addressing) .
Code: |
jmp! target_address
jmp!short target_address
jmp!near target_address
jmp!long target_address
call! target_address
call!short target_address
call!near target_address
call!long target_address
|
The target address should be expected to evaluate to a static address, ie. no [...] format and no register etc.
Without the distance modifier after !, it select the shortest form possible,
else it force near/long if specified and possible. !short is kind of redundancy.
In case of force Near, but the jump distance is greater than 2G,
it will try allocate a trampoline to keep the jump using 5-bytes format.
The trampoline and long jump seems only useful if making an aa script with ONE allocation with multiple inject point in some jit game engine (ie. mono-il-jit).
So unnecessary is this extension, but may provide some convenience.
bye~ _________________ - Retarded.
|
|