]> git.proxmox.com Git - mirror_qemu.git/blob - target/nios2/op_helper.c
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
[mirror_qemu.git] / target / nios2 / op_helper.c
1 /*
2 * Altera Nios II helper routines.
3 *
4 * Copyright (C) 2012 Chris Wulff <crwulff@gmail.com>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see
18 * <http://www.gnu.org/licenses/lgpl-2.1.html>
19 */
20
21 #include "cpu.h"
22 #include "exec/helper-proto.h"
23 #include "exec/cpu_ldst.h"
24
25 #if !defined(CONFIG_USER_ONLY)
26 void helper_mmu_read_debug(CPUNios2State *env, uint32_t rn)
27 {
28 mmu_read_debug(env, rn);
29 }
30
31 void helper_mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v)
32 {
33 mmu_write(env, rn, v);
34 }
35
36 void helper_check_interrupts(CPUNios2State *env)
37 {
38 nios2_check_interrupts(env);
39 }
40 #endif /* !CONFIG_USER_ONLY */
41
42 void helper_raise_exception(CPUNios2State *env, uint32_t index)
43 {
44 CPUState *cs = ENV_GET_CPU(env);
45 cs->exception_index = index;
46 cpu_loop_exit(cs);
47 }