~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/nospec-insn.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_S390_NOSPEC_ASM_H
  3 #define _ASM_S390_NOSPEC_ASM_H
  4 
  5 #include <linux/linkage.h>
  6 #include <asm/dwarf.h>
  7 
  8 #ifdef __ASSEMBLY__
  9 
 10 #ifdef CC_USING_EXPOLINE
 11 
 12 /*
 13  * The expoline macros are used to create thunks in the same format
 14  * as gcc generates them. The 'comdat' section flag makes sure that
 15  * the various thunks are merged into a single copy.
 16  */
 17         .macro __THUNK_PROLOG_NAME name
 18 #ifdef CONFIG_EXPOLINE_EXTERN
 19         SYM_CODE_START(\name)
 20 #else
 21         .pushsection .text.\name,"axG",@progbits,\name,comdat
 22         .globl \name
 23         .hidden \name
 24         .type \name,@function
 25 \name:
 26         CFI_STARTPROC
 27 #endif
 28         .endm
 29 
 30         .macro __THUNK_EPILOG_NAME name
 31 #ifdef CONFIG_EXPOLINE_EXTERN
 32         SYM_CODE_END(\name)
 33         EXPORT_SYMBOL(\name)
 34 #else
 35         CFI_ENDPROC
 36         .popsection
 37 #endif
 38         .endm
 39 
 40         .macro __THUNK_PROLOG_BR r1
 41         __THUNK_PROLOG_NAME __s390_indirect_jump_r\r1
 42         .endm
 43 
 44         .macro __THUNK_EPILOG_BR r1
 45         __THUNK_EPILOG_NAME __s390_indirect_jump_r\r1
 46         .endm
 47 
 48         .macro __THUNK_BR r1
 49         jg      __s390_indirect_jump_r\r1
 50         .endm
 51 
 52         .macro __THUNK_BRASL r1,r2
 53         brasl   \r1,__s390_indirect_jump_r\r2
 54         .endm
 55 
 56         .macro  __DECODE_R expand,reg
 57         .set .L__decode_fail,1
 58         .irp r1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
 59         .ifc \reg,%r\r1
 60         \expand \r1
 61         .set .L__decode_fail,0
 62         .endif
 63         .endr
 64         .if .L__decode_fail == 1
 65         .error "__DECODE_R failed"
 66         .endif
 67         .endm
 68 
 69         .macro  __DECODE_RR expand,rsave,rtarget
 70         .set .L__decode_fail,1
 71         .irp r1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
 72         .ifc \rsave,%r\r1
 73         .irp r2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
 74         .ifc \rtarget,%r\r2
 75         \expand \r1,\r2
 76         .set .L__decode_fail,0
 77         .endif
 78         .endr
 79         .endif
 80         .endr
 81         .if .L__decode_fail == 1
 82         .error "__DECODE_RR failed"
 83         .endif
 84         .endm
 85 
 86         .macro __THUNK_EX_BR reg
 87         exrl    0,555f
 88         j       .
 89 555:    br      \reg
 90         .endm
 91 
 92 #ifdef CONFIG_EXPOLINE_EXTERN
 93         .macro GEN_BR_THUNK reg
 94         .endm
 95         .macro GEN_BR_THUNK_EXTERN reg
 96 #else
 97         .macro GEN_BR_THUNK reg
 98 #endif
 99         __DECODE_R __THUNK_PROLOG_BR,\reg
100         __THUNK_EX_BR \reg
101         __DECODE_R __THUNK_EPILOG_BR,\reg
102         .endm
103 
104         .macro BR_EX reg
105 557:    __DECODE_R __THUNK_BR,\reg
106         .pushsection .s390_indirect_branches,"a",@progbits
107         .long   557b-.
108         .popsection
109         .endm
110 
111         .macro BASR_EX rsave,rtarget
112 559:    __DECODE_RR __THUNK_BRASL,\rsave,\rtarget
113         .pushsection .s390_indirect_branches,"a",@progbits
114         .long   559b-.
115         .popsection
116         .endm
117 
118 #else
119         .macro GEN_BR_THUNK reg
120         .endm
121 
122          .macro BR_EX reg
123         br      \reg
124         .endm
125 
126         .macro BASR_EX rsave,rtarget
127         basr    \rsave,\rtarget
128         .endm
129 #endif /* CC_USING_EXPOLINE */
130 
131 #endif /* __ASSEMBLY__ */
132 
133 #endif /* _ASM_S390_NOSPEC_ASM_H */
134 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php