Home | History | Annotate | Line # | Download | only in include
asm.h revision 1.5
      1 /* $NetBSD: asm.h,v 1.5 2019/12/20 07:16:43 ryo Exp $ */
      2 
      3 #ifndef _AARCH64_ASM_H_
      4 #define _AARCH64_ASM_H_
      5 
      6 #include <arm/asm.h>
      7 
      8 #ifdef __aarch64__
      9 #define	fp	x29
     10 #define	lr	x30
     11 
     12 /*
     13  * Add a speculation barrier after the 'eret'.
     14  * Some aarch64 cpus speculatively execute instructions after 'eret',
     15  * and this potentiates side-channel attacks.
     16  */
     17 #define	ERET	\
     18 	eret; dsb sy; isb
     19 
     20 #endif
     21 
     22 #endif /* !_AARCH64_ASM_H_ */
     23