#include "encoding.h"
-// Enough stack to store every register in case a trap handler is executed,
-// plus 33 more values.
-#define STACK_SIZE (64 * XLEN / 8)
+#define STACK_SIZE (90 * XLEN / 8)
#if XLEN == 64
# define LREG ld
j _init
+.align 2
trap_entry:
addi sp, sp, -32*REGBYTES
j loop_forever
// Fill the stack with data so we can see if it was overrun.
+ .section .data
.align 4
stack_bottom:
.fill NHARTS * STACK_SIZE/4, 4, 0x22446688