Skip to content
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

i#3544 RV64: Implemented dynamorio-clone #6063

Merged
merged 7 commits into from
May 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion core/arch/riscv64/riscv64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,16 @@ GLOBAL_LABEL(_dynamorio_runtime_resolve:)
*/
DECLARE_FUNC(dynamorio_clone)
GLOBAL_LABEL(dynamorio_clone:)
/* FIXME i#3544: Not implemented */
sd ARG1, 8 (ARG2)
sd ARG6, 0 (ARG2) /* Func is now on TOS of newsp. */
shiptux marked this conversation as resolved.
Show resolved Hide resolved
li SYSNUM_REG, SYS_clone /* All args are already in syscall registers.*/
ecall
bnez ARG1, dynamorio_clone_parent
ld ARG1, 0 (sp)
ld ARG2, 8 (sp)
shiptux marked this conversation as resolved.
Show resolved Hide resolved
jalr ARG1
jal GLOBAL_REF(unexpected_return)
dynamorio_clone_parent:
ret
END_FUNC(dynamorio_clone)

Expand Down