linux-user/microblaze: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson
2025-07-28 21:44:06 -10:00
parent e17cc00f71
commit 2ffaa3f70d
2 changed files with 6 additions and 41 deletions

View File

@@ -640,13 +640,7 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUMIPSState *e
#define ELF_CLASS ELFCLASS32
#define ELF_ARCH EM_MICROBLAZE
static inline void init_thread(struct target_pt_regs *regs,
struct image_info *infop)
{
regs->pc = infop->entry;
regs->r1 = infop->start_stack;
}
#define HAVE_INIT_MAIN_THREAD
#define ELF_EXEC_PAGESIZE 4096

View File

@@ -127,39 +127,10 @@ void cpu_loop(CPUMBState *env)
}
}
void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs)
void init_main_thread(CPUState *cs, struct image_info *info)
{
env->regs[0] = regs->r0;
env->regs[1] = regs->r1;
env->regs[2] = regs->r2;
env->regs[3] = regs->r3;
env->regs[4] = regs->r4;
env->regs[5] = regs->r5;
env->regs[6] = regs->r6;
env->regs[7] = regs->r7;
env->regs[8] = regs->r8;
env->regs[9] = regs->r9;
env->regs[10] = regs->r10;
env->regs[11] = regs->r11;
env->regs[12] = regs->r12;
env->regs[13] = regs->r13;
env->regs[14] = regs->r14;
env->regs[15] = regs->r15;
env->regs[16] = regs->r16;
env->regs[17] = regs->r17;
env->regs[18] = regs->r18;
env->regs[19] = regs->r19;
env->regs[20] = regs->r20;
env->regs[21] = regs->r21;
env->regs[22] = regs->r22;
env->regs[23] = regs->r23;
env->regs[24] = regs->r24;
env->regs[25] = regs->r25;
env->regs[26] = regs->r26;
env->regs[27] = regs->r27;
env->regs[28] = regs->r28;
env->regs[29] = regs->r29;
env->regs[30] = regs->r30;
env->regs[31] = regs->r31;
env->pc = regs->pc;
CPUArchState *env = cpu_env(cs);
env->pc = info->entry;
env->regs[1] = info->start_stack;
}