xref: /openbmc/u-boot/arch/nios2/cpu/traps.c (revision e8f80a5a)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
4  * Scott McNutt <smcnutt@psyent.com>
5  */
6 
7 #include <asm/ptrace.h>
8 #include <common.h>
9 
trap_handler(struct pt_regs * regs)10 void trap_handler (struct pt_regs *regs)
11 {
12 	/* Just issue warning */
13 	printf ("\n\n*** WARNING: unimplemented trap @ %08x\n\n",
14 			regs->reg[29] - 4);
15 }
16 
soft_emulation(struct pt_regs * regs)17 void soft_emulation (struct pt_regs *regs)
18 {
19 	/* TODO: Software emulation of mul/div etc. Until this is
20 	 * implemented, generate warning and hang.
21 	 */
22 	printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n",
23 			regs->reg[29] - 4);
24 	hang ();
25 }
26