-/* $OpenBSD: vector.S,v 1.91 2023/04/16 05:39:33 guenther Exp $ */
+/* $OpenBSD: vector.S,v 1.92 2023/04/17 00:02:14 deraadt Exp $ */
/* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */
/*
IDTVEC(trap0e)
TRAP(T_PAGEFLT)
IDTVEC(intrspurious)
-IDTVEC_NOALIGN(trap0f)
+IDTVEC_ALIAS(trap0f, intrspurious)
iretq
IDTVEC(trap10)
ZTRAP(T_ARITHTRAP)
ZTRAP(T_VE)
IDTVEC(trap15)
TRAP(T_CP)
-IDTVEC(trap16)
-IDTVEC_NOALIGN(trap17)
-IDTVEC_NOALIGN(trap18)
-IDTVEC_NOALIGN(trap19)
-IDTVEC_NOALIGN(trap1a)
-IDTVEC_NOALIGN(trap1b)
-IDTVEC_NOALIGN(trap1c)
-IDTVEC_NOALIGN(trap1d)
-IDTVEC_NOALIGN(trap1e)
-IDTVEC_NOALIGN(trap1f)
+IDTVEC(trap1f)
+IDTVEC_ALIAS(trap16, trap1f)
+IDTVEC_ALIAS(trap17, trap1f)
+IDTVEC_ALIAS(trap18, trap1f)
+IDTVEC_ALIAS(trap19, trap1f)
+IDTVEC_ALIAS(trap1a, trap1f)
+IDTVEC_ALIAS(trap1b, trap1f)
+IDTVEC_ALIAS(trap1c, trap1f)
+IDTVEC_ALIAS(trap1d, trap1f)
+IDTVEC_ALIAS(trap1e, trap1f)
/* 22 - 31 reserved for future exp */
ZTRAP(T_RESERVED)
-/* $OpenBSD: asm.h,v 1.23 2022/12/01 00:26:15 guenther Exp $ */
+/* $OpenBSD: asm.h,v 1.24 2023/04/17 00:02:14 deraadt Exp $ */
/* $NetBSD: asm.h,v 1.2 2003/05/02 18:05:47 yamt Exp $ */
/*-
#define KTEXT_PAGE_END .popsection
#define IDTVEC(name) \
- KUTEXT; _ALIGN_TRAPS; IDTVEC_NOALIGN(name)
+ KUTEXT; _ALIGN_TRAPS; IDTVEC_NOALIGN(name); endbr64
#define GENTRY(x) .globl x; _FENTRY(x)
#define IDTVEC_NOALIGN(name) GENTRY(X ## name)
+#define IDTVEC_ALIAS(alias,sym) \
+ .global X ## alias; \
+ X ## alias = X ## sym;
#define KIDTVEC(name) \
- .text; _ALIGN_TRAPS; IDTVEC_NOALIGN(name)
+ .text; _ALIGN_TRAPS; IDTVEC_NOALIGN(name); endbr64
#define KIDTVEC_FALLTHROUGH(name) \
_ALIGN_TEXT; IDTVEC_NOALIGN(name)
#define KUENTRY(x) \
# define RETGUARD_SYMBOL(x)
#endif
-#define ENTRY(y) _ENTRY(y); _PROF_PROLOGUE
+#define ENTRY(y) _ENTRY(y); endbr64; _PROF_PROLOGUE
#define NENTRY(y) _NENTRY(y)
-#define ASENTRY(y) _NENTRY(y); _PROF_PROLOGUE
-#define ENTRY_NB(y) _ENTRY_NB(y); _PROF_PROLOGUE
+#define ASENTRY(y) _NENTRY(y); endbr64; _PROF_PROLOGUE
+#define ENTRY_NB(y) _ENTRY_NB(y); endbr64; _PROF_PROLOGUE
#define END(y) .size y, . - y
#define STRONG_ALIAS(alias,sym) \
-/* $OpenBSD: frameasm.h,v 1.25 2020/11/12 23:29:16 guenther Exp $ */
+/* $OpenBSD: frameasm.h,v 1.26 2023/04/17 00:02:14 deraadt Exp $ */
/* $NetBSD: frameasm.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
*/
#define INTRENTRY_LABEL(label) X##label##_untramp
#define INTRENTRY(label) \
+ endbr64 ; \
testb $SEL_RPL,IRETQ_CS(%rsp) ; \
je INTRENTRY_LABEL(label) ; \
swapgs ; \