-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters validation in call_function opcodes. #56
Conversation
…ll_function opcodes.
7b16a43
to
15b1a03
Compare
…s in call_function opcodes.
…s in call_function opcodes.
…s in call_function opcodes.
source/CCustomOpcodeSystem.cpp
Outdated
test ecx, ecx | ||
jz call_func_this_end | ||
mov ecx, struc | ||
call_func_this_end: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
micro-optimization:
since you used ecx
for intermediate calculations, we could assign ecx
to struct
regardless of thisCall
value. It could be a garbage value, could be not, the callee will use it if needed.
ie.
// set struct pointer for this call
mov ecx, struc
// call function
xor eax, eax
call func
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Even better, as unused struc
has value 0.
Updated.
…s in call_function opcodes.
Updated string params handling.