vectored exceptions) by adding an alignment constraint to cpu_exception_handler.
-/* $OpenBSD: exception.S,v 1.6 2022/12/02 12:27:08 jca Exp $ */
+/* $OpenBSD: exception.S,v 1.7 2023/11/20 16:10:37 miod Exp $ */
/*-
* Copyright (c) 2015-2018 Ruslan Bukin <br@bsdpad.com>
2:
.endm
+ /*
+ * cpu_exception_handler needs to be aligned to a 32-bit
+ * boundary, but ENTRY() only enforces 16-bit alignment.
+ */
+ .text
+ .p2align 2
ENTRY(cpu_exception_handler)
csrrw sp, sscratch, sp
beqz sp, 1f