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 91d7d4034SJia Liu * version 2 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 201d7d4034SJia Liu #include "cpu.h" 211d7d4034SJia Liu #include "exception.h" 221d7d4034SJia Liu 231d7d4034SJia Liu void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp) 241d7d4034SJia Liu { 2527103424SAndreas Färber CPUState *cs = CPU(cpu); 2627103424SAndreas Färber 2727103424SAndreas Färber cs->exception_index = excp; 281d7d4034SJia Liu cpu_loop_exit(&cpu->env); 291d7d4034SJia Liu } 30