diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-21 18:01:25 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-21 18:01:25 +0200 |
| commit | e25f1e7a8f8f2320546ad4950464713d85b47785 (patch) | |
| tree | c92025b1efbf756e0663de4bb62f3e36a61868c0 /arch/riscv64/kernel/cpu.c | |
| parent | e1599d8ab33f3f7d09c6a8a05f954209c969c8c1 (diff) | |
| download | kmi-e25f1e7a8f8f2320546ad4950464713d85b47785.tar.gz kmi-e25f1e7a8f8f2320546ad4950464713d85b47785.zip | |
fix llvm
Diffstat (limited to 'arch/riscv64/kernel/cpu.c')
| -rw-r--r-- | arch/riscv64/kernel/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |
