xref: /qemu/target/openrisc/interrupt_helper.c (revision 779fc6ada1002b0466878e05832b08e44f0195ec)
1b6a71ef7SJia Liu /*
2b6a71ef7SJia Liu  * OpenRISC interrupt helper routines
3b6a71ef7SJia Liu  *
4b6a71ef7SJia Liu  * Copyright (c) 2011-2012 Jia Liu <proljc@gmail.com>
5b6a71ef7SJia Liu  *                         Feng Gao <gf91597@gmail.com>
6b6a71ef7SJia Liu  *
7b6a71ef7SJia Liu  * This library is free software; you can redistribute it and/or
8b6a71ef7SJia Liu  * modify it under the terms of the GNU Lesser General Public
9b6a71ef7SJia Liu  * License as published by the Free Software Foundation; either
10*779fc6adSThomas Huth  * version 2.1 of the License, or (at your option) any later version.
11b6a71ef7SJia Liu  *
12b6a71ef7SJia Liu  * This library is distributed in the hope that it will be useful,
13b6a71ef7SJia Liu  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14b6a71ef7SJia Liu  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15b6a71ef7SJia Liu  * Lesser General Public License for more details.
16b6a71ef7SJia Liu  *
17b6a71ef7SJia Liu  * You should have received a copy of the GNU Lesser General Public
18b6a71ef7SJia Liu  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19b6a71ef7SJia Liu  */
20b6a71ef7SJia Liu 
21ed2decc6SPeter Maydell #include "qemu/osdep.h"
22b6a71ef7SJia Liu #include "cpu.h"
2363c91552SPaolo Bonzini #include "exec/exec-all.h"
242ef6175aSRichard Henderson #include "exec/helper-proto.h"
25b6a71ef7SJia Liu 
26b6a71ef7SJia Liu void HELPER(rfe)(CPUOpenRISCState *env)
27b6a71ef7SJia Liu {
28b9bed1b9SRichard Henderson     env->pc = env->epcr;
29b9bed1b9SRichard Henderson     env->lock_addr = -1;
30b9bed1b9SRichard Henderson     cpu_set_sr(env, env->esr);
31b6a71ef7SJia Liu }
32