-
Notifications
You must be signed in to change notification settings - Fork 49
Migrate fast interpreter gen to use macro assembler #554
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
base: master
Are you sure you want to change the base?
Conversation
| genCopyStackValsToVfp(cnt, r_tmp1); | ||
| // Deallocate interpreter frame and return to calling code. | ||
| asm.movd_r_i(Target.V3_RET_GPRS[0], 0); | ||
| asm.movd_r_i(G(Target.V3_RET_GPRS[0]), 0); |
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.
There are a lot of methods in MacroAssembler for emitting a constant into a register. I think emit_mov_r_i will do here.
| saveCallerIVars(); | ||
| callRuntime(refRuntimeCall(X86_64RT.runtime_checkFuncSigSubtyping), [r_instance, sig_index, r_func_arg], false); | ||
| asm.movq_r_r(r_func_arg, Target.V3_RET_GPRS[0]); | ||
| asm.movq_r_r(r_func_arg, G(Target.V3_RET_GPRS[0])); |
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.
There is masm.emit_mov_r_r(kind, reg, reg) for this one.
| asm.q.add_r_r(r_stp, handler_length); | ||
| } | ||
| private def adjustSp(size: int) { | ||
| if (size > 0) { |
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.
I think we should let the macro assembler do this check for negative sizes. IIRC the 1-byte addi on intel will do sign extension, which will make it smaller than subi for negative values that fit in one byte.
| def TRAPS_STUB = X86_64SpcTrapsStub.new(); | ||
| def TRAPS_PREGEN = X86_64PreGenStub.new("spc-trap", TRAPS_STUB, genTrapsStub); | ||
|
|
||
| def genSpcEntryFunc(ic: X86_64InterpreterCode, w: DataWriter) { |
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.
In a follow-up PR, we might be able to pull this up to the arch-independent part of SPC.
No description provided.