This patch initializes thread pointer register to Thread Local Storage
(TLS)'s pointer given to a clone system call.
Change-Id: I03e2cf4763e6a0ed31f357772a513a05e1e3461b
Reviewed-on: https://gem5-review.googlesource.com/c/9622
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
uint64_t stack, uint64_t tls)
{
RiscvISA::copyRegs(ptc, ctc);
+ if (flags & TGT_CLONE_SETTLS)
+ ctc->setIntReg(RiscvISA::ThreadPointerReg, tls);
if (stack)
ctc->setIntReg(RiscvISA::StackPointerReg, stack);
}