File tree Expand file tree Collapse file tree 6 files changed +280
-171
lines changed Expand file tree Collapse file tree 6 files changed +280
-171
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,36 @@ _x86_64_asm_load_gs:
173173 mov %di , %gs
174174 retq
175175
176+ .global _x86_64_asm_get_ss
177+ .p2align 4
178+ _x86_64_asm_get_ss:
179+ mov %ss , %ax
180+ retq
181+
182+ .global _x86_64_asm_get_ds
183+ .p2align 4
184+ _x86_64_asm_get_ds:
185+ mov %ds , %ax
186+ retq
187+
188+ .global _x86_64_asm_get_es
189+ .p2align 4
190+ _x86_64_asm_get_es:
191+ mov %es , %ax
192+ retq
193+
194+ .global _x86_64_asm_get_fs
195+ .p2align 4
196+ _x86_64_asm_get_fs:
197+ mov %fs , %ax
198+ retq
199+
200+ .global _x86_64_asm_get_gs
201+ .p2align 4
202+ _x86_64_asm_get_gs:
203+ mov %gs , %ax
204+ retq
205+
176206.global _x86_64_asm_swapgs
177207.p2align 4
178208_x86_64_asm_swapgs:
Original file line number Diff line number Diff line change @@ -114,6 +114,36 @@ extern "C" {
114114 ) ]
115115 pub ( crate ) fn x86_64_asm_load_gs ( sel : u16 ) ;
116116
117+ #[ cfg_attr(
118+ any( target_env = "gnu" , target_env = "musl" ) ,
119+ link_name = "_x86_64_asm_get_ss"
120+ ) ]
121+ pub ( crate ) fn x86_64_asm_get_ss ( ) -> u16 ;
122+
123+ #[ cfg_attr(
124+ any( target_env = "gnu" , target_env = "musl" ) ,
125+ link_name = "_x86_64_asm_get_ds"
126+ ) ]
127+ pub ( crate ) fn x86_64_asm_get_ds ( ) -> u16 ;
128+
129+ #[ cfg_attr(
130+ any( target_env = "gnu" , target_env = "musl" ) ,
131+ link_name = "_x86_64_asm_get_es"
132+ ) ]
133+ pub ( crate ) fn x86_64_asm_get_es ( ) -> u16 ;
134+
135+ #[ cfg_attr(
136+ any( target_env = "gnu" , target_env = "musl" ) ,
137+ link_name = "_x86_64_asm_get_fs"
138+ ) ]
139+ pub ( crate ) fn x86_64_asm_get_fs ( ) -> u16 ;
140+
141+ #[ cfg_attr(
142+ any( target_env = "gnu" , target_env = "musl" ) ,
143+ link_name = "_x86_64_asm_get_gs"
144+ ) ]
145+ pub ( crate ) fn x86_64_asm_get_gs ( ) -> u16 ;
146+
117147 #[ cfg_attr(
118148 any( target_env = "gnu" , target_env = "musl" ) ,
119149 link_name = "_x86_64_asm_swapgs"
You can’t perform that action at this time.
0 commit comments