From e25f1e7a8f8f2320546ad4950464713d85b47785 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 21 Nov 2022 18:01:25 +0200 Subject: fix llvm --- arch/riscv64/kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/riscv64/kernel/cpu.c') diff --git a/arch/riscv64/kernel/cpu.c b/arch/riscv64/kernel/cpu.c index 60140e6..e8c8f34 100644 --- a/arch/riscv64/kernel/cpu.c +++ b/arch/riscv64/kernel/cpu.c @@ -39,7 +39,8 @@ id_t cpu_id() /* @todo should this be the default for all arches? */ struct tcb *cur_tcb() { - register struct tcb *t __asm__ ("tp"); + struct tcb *t; + __asm__ volatile ("mv %0, tp" : "=r" (t) ::); return t; } -- cgit v1.3