xref: /qemu/target/ppc/helper_regs.h (revision 6494d2c1fd4ebc37b575130399a97a1fcfff1afc)
10411a972Sj_mayer /*
20411a972Sj_mayer  *  PowerPC emulation special registers manipulation helpers for qemu.
30411a972Sj_mayer  *
40411a972Sj_mayer  *  Copyright (c) 2003-2007 Jocelyn Mayer
50411a972Sj_mayer  *
60411a972Sj_mayer  * This library is free software; you can redistribute it and/or
70411a972Sj_mayer  * modify it under the terms of the GNU Lesser General Public
80411a972Sj_mayer  * License as published by the Free Software Foundation; either
96bd039cdSChetan Pant  * version 2.1 of the License, or (at your option) any later version.
100411a972Sj_mayer  *
110411a972Sj_mayer  * This library is distributed in the hope that it will be useful,
120411a972Sj_mayer  * but WITHOUT ANY WARRANTY; without even the implied warranty of
130411a972Sj_mayer  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
140411a972Sj_mayer  * Lesser General Public License for more details.
150411a972Sj_mayer  *
160411a972Sj_mayer  * You should have received a copy of the GNU Lesser General Public
178167ee88SBlue Swirl  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
180411a972Sj_mayer  */
190411a972Sj_mayer 
202a6a4076SMarkus Armbruster #ifndef HELPER_REGS_H
212a6a4076SMarkus Armbruster #define HELPER_REGS_H
220411a972Sj_mayer 
238a05fd9aSRichard Henderson void hreg_swap_gpr_tgpr(CPUPPCState *env);
248a05fd9aSRichard Henderson void hreg_compute_hflags(CPUPPCState *env);
25*6494d2c1SNicholas Piggin void hreg_update_pmu_hflags(CPUPPCState *env);
268a05fd9aSRichard Henderson void cpu_interrupt_exittb(CPUState *cs);
278a05fd9aSRichard Henderson int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv);
28044897efSRichard Purdie 
298a05fd9aSRichard Henderson #ifdef CONFIG_USER_ONLY
30e3cffe6fSNikunj A Dadhania static inline void check_tlb_flush(CPUPPCState *env, bool global) { }
318a05fd9aSRichard Henderson #else
328a05fd9aSRichard Henderson void check_tlb_flush(CPUPPCState *env, bool global);
33cd0c6f47SBenjamin Herrenschmidt #endif
34cd0c6f47SBenjamin Herrenschmidt 
352a6a4076SMarkus Armbruster #endif /* HELPER_REGS_H */
36