11d7d4034SJia Liu /* 21d7d4034SJia Liu * OpenRISC exception. 31d7d4034SJia Liu * 41d7d4034SJia Liu * Copyright (c) 2011-2012 Jia Liu <proljc@gmail.com> 51d7d4034SJia Liu * 61d7d4034SJia Liu * This library is free software; you can redistribute it and/or 71d7d4034SJia Liu * modify it under the terms of the GNU Lesser General Public 81d7d4034SJia Liu * License as published by the Free Software Foundation; either 9*198a2d21SThomas Huth * version 2.1 of the License, or (at your option) any later version. 101d7d4034SJia Liu * 111d7d4034SJia Liu * This library is distributed in the hope that it will be useful, 121d7d4034SJia Liu * but WITHOUT ANY WARRANTY; without even the implied warranty of 131d7d4034SJia Liu * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 141d7d4034SJia Liu * Lesser General Public License for more details. 151d7d4034SJia Liu * 161d7d4034SJia Liu * You should have received a copy of the GNU Lesser General Public 171d7d4034SJia Liu * License along with this library; if not, see <http://www.gnu.org/licenses/>. 181d7d4034SJia Liu */ 191d7d4034SJia Liu 20ed2decc6SPeter Maydell #include "qemu/osdep.h" 211d7d4034SJia Liu #include "cpu.h" 2263c91552SPaolo Bonzini #include "exec/exec-all.h" 231d7d4034SJia Liu #include "exception.h" 241d7d4034SJia Liu 251d7d4034SJia Liu void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp) 261d7d4034SJia Liu { 2727103424SAndreas Färber CPUState *cs = CPU(cpu); 2827103424SAndreas Färber 2927103424SAndreas Färber cs->exception_index = excp; 305638d180SAndreas Färber cpu_loop_exit(cs); 311d7d4034SJia Liu } 32