| 1 | /* |
| 2 | * ARM AArch64 specific CPU for bsd-user |
| 3 | * |
| 4 | * Copyright (c) 2015 Stacey D. Son |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | #include "qemu/osdep.h" |
| 9 | #include "target_arch.h" |
| 10 | |
| 11 | /* See cpu_set_user_tls() in arm64/arm64/vm_machdep.c */ |
| 12 | void target_cpu_set_tls(CPUARMState *env, target_ulong newtls) |
| 13 | { |
| 14 | env->cp15.tpidr_el[0] = newtls; |
| 15 | } |
| 16 | |
| 17 | target_ulong target_cpu_get_tls(CPUARMState *env) |
| 18 | { |
| 19 | return env->cp15.tpidr_el[0]; |
| 20 | } |