1*6291ad77SPeter Maydell /* 2*6291ad77SPeter Maydell * OpenRISC specific CPU ABI and functions for linux-user 3*6291ad77SPeter Maydell * 4*6291ad77SPeter Maydell * Copyright (c) 2011-2012 Jia Liu <proljc@gmail.com> 5*6291ad77SPeter Maydell * 6*6291ad77SPeter Maydell * This library is free software; you can redistribute it and/or 7*6291ad77SPeter Maydell * modify it under the terms of the GNU Lesser General Public 8*6291ad77SPeter Maydell * License as published by the Free Software Foundation; either 9*6291ad77SPeter Maydell * version 2 of the License, or (at your option) any later version. 10*6291ad77SPeter Maydell * 11*6291ad77SPeter Maydell * This library is distributed in the hope that it will be useful, 12*6291ad77SPeter Maydell * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*6291ad77SPeter Maydell * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14*6291ad77SPeter Maydell * Lesser General Public License for more details. 15*6291ad77SPeter Maydell * 16*6291ad77SPeter Maydell * You should have received a copy of the GNU Lesser General Public 17*6291ad77SPeter Maydell * License along with this library; if not, see <http://www.gnu.org/licenses/>. 18*6291ad77SPeter Maydell */ 19*6291ad77SPeter Maydell 20*6291ad77SPeter Maydell #ifndef TARGET_CPU_H 21*6291ad77SPeter Maydell #define TARGET_CPU_H 22*6291ad77SPeter Maydell 23*6291ad77SPeter Maydell static inline void cpu_clone_regs(CPUOpenRISCState *env, target_ulong newsp) 24*6291ad77SPeter Maydell { 25*6291ad77SPeter Maydell if (newsp) { 26*6291ad77SPeter Maydell env->gpr[1] = newsp; 27*6291ad77SPeter Maydell } 28*6291ad77SPeter Maydell env->gpr[2] = 0; 29*6291ad77SPeter Maydell } 30*6291ad77SPeter Maydell 31*6291ad77SPeter Maydell /* TODO: need to implement cpu_set_tls() */ 32*6291ad77SPeter Maydell 33*6291ad77SPeter Maydell #endif 34