2 * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef HEXAGON_TARGET_CPU_H
19 #define HEXAGON_TARGET_CPU_H
21 static inline void cpu_clone_regs_child(CPUHexagonState
*env
,
22 target_ulong newsp
, unsigned flags
)
25 env
->gpr
[HEX_REG_SP
] = newsp
;
30 static inline void cpu_clone_regs_parent(CPUHexagonState
*env
, unsigned flags
)
34 static inline void cpu_set_tls(CPUHexagonState
*env
, target_ulong newtls
)
36 env
->gpr
[HEX_REG_UGP
] = newtls
;
39 static inline abi_ulong
get_sp_from_cpustate(CPUHexagonState
*state
)
41 return state
->gpr
[HEX_REG_SP
];