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 9198a2d21SThomas 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" 221d7d4034SJia Liu #include "exception.h" 231d7d4034SJia Liu raise_exception(OpenRISCCPU * cpu,uint32_t excp)24*8905770bSMarc-André LureauG_NORETURN void raise_exception(OpenRISCCPU *cpu, uint32_t excp) 251d7d4034SJia Liu { 2627103424SAndreas Färber CPUState *cs = CPU(cpu); 2727103424SAndreas Färber 2827103424SAndreas Färber cs->exception_index = excp; 295638d180SAndreas Färber cpu_loop_exit(cs); 301d7d4034SJia Liu } 31