Code: Select all
label(jitAddress)
registersymbol(jitAddress)
Jump:To:Address: //thanks to mono features
jitAddress:
newmem:
mov r11,[jitAddress]
call r11
Code: Select all
lea rax,[rax+rcx*8+20]
mov rax, [rax]
Code: Select all
label(jitAddress)
registersymbol(jitAddress)
Jump:To:Address: //thanks to mono features
jitAddress:
newmem:
mov r11,[jitAddress]
call r11
Code: Select all
lea rax,[rax+rcx*8+20]
mov rax, [rax]
mov rax,[rax+rcx*8+20]
is the same thing and would be faster.
I don't know if it's a language barrier or what. But that was painful to try and read, and after three tries I still don't understand what you're trying to say here.miraikolus wrote: ↑Fri May 15, 2020 11:18 pmWhat I do want to do is easy, call a function I do know does what i want (on above code - of course i'd do checks & co, set parameters before, thus "simplified"). Now in LUA, there are few methods to resolve, at last i'll prob need [Link] while addr. needs to be conv. to int.
But I am act. looking for a more simple instruction in code, i mean both options do get executed before actual asm, but above will require less.
...
Probably just something the compiler does.miraikolus wrote: ↑Fri May 15, 2020 11:18 pm...
Yeah, I do know what lea does. I just don't get why unity does that ...
Maybe but I have no idea, not really knowledgeable with the Unity Engine. But it might be defined and used in a way that the code that uses it is only compiled in a development version, thus it wouldn't even be in the release version; which would make for better optimization of the game at release. But again, not really sure.miraikolus wrote: ↑Fri May 15, 2020 11:18 pm... is there some debug=0 val/cons not set or ....? (yeah this question is something different and requires some ... history with unity compil. & asm.
call "Jump:To:Address"
[rax+rcx*8+20]
may be a form to access an item in an array type.rax+20
.rax+18
.Lea
may also to do simple constant multiply on registers, usually several Lea
run together.
That's what i mean, it is a released game. So I do wonder why. May they just forgot to disable those dev flags. But any way, that was just my curiosity.But it might be defined and used in a way that the code that uses it is only compiled in a development version, thus it wouldn't even be in the release version; which would make for better optimization of the game at release. But again, not really sure.
.... right clear. I never had to use that for unity up to now. But it's clear that this is an option. Thanks, that's what I did need.
Users browsing this forum: No registered users