@@ -170,8 +170,7 @@ pub unsafe fn record_sp_limit(limit: usize) {
170
170
asm ! ( "movl $$0x48+90*4, %eax
171
171
movl $0, %gs:(%eax)" :: "r" ( limit) : "eax" : "volatile" )
172
172
}
173
- #[ cfg( all( target_arch = "x86" ,
174
- any( target_os = "linux" , target_os = "freebsd" ) ) ) ]
173
+ #[ cfg( all( target_arch = "x86" , target_os = "linux" ) ) ]
175
174
#[ inline( always) ]
176
175
unsafe fn target_record_sp_limit ( limit : usize ) {
177
176
asm ! ( "movl $0, %gs:48" :: "r" ( limit) :: "volatile" )
@@ -197,10 +196,12 @@ pub unsafe fn record_sp_limit(limit: usize) {
197
196
// aarch64 - FIXME(AARCH64): missing...
198
197
// powerpc - FIXME(POWERPC): missing...
199
198
// arm-ios - iOS segmented stack is disabled for now, see related notes
200
- // openbsd - segmented stack is disabled
199
+ // openbsd/bitrig/netbsd - no segmented stacks.
200
+ // x86-freebsd - no segmented stacks.
201
201
#[ cfg( any( target_arch = "aarch64" ,
202
202
target_arch = "powerpc" ,
203
203
all( target_arch = "arm" , target_os = "ios" ) ,
204
+ all( target_arch = "x86" , target_os = "freebsd" ) ,
204
205
target_os = "bitrig" ,
205
206
target_os = "netbsd" ,
206
207
target_os = "openbsd" ) ) ]
@@ -262,8 +263,7 @@ pub unsafe fn get_sp_limit() -> usize {
262
263
movl %gs:(%eax), $0" : "=r" ( limit) :: "eax" : "volatile" ) ;
263
264
return limit;
264
265
}
265
- #[ cfg( all( target_arch = "x86" ,
266
- any( target_os = "linux" , target_os = "freebsd" ) ) ) ]
266
+ #[ cfg( all( target_arch = "x86" , target_os = "linux" ) ) ]
267
267
#[ inline( always) ]
268
268
unsafe fn target_get_sp_limit ( ) -> usize {
269
269
let limit;
@@ -291,14 +291,16 @@ pub unsafe fn get_sp_limit() -> usize {
291
291
292
292
// aarch64 - FIXME(AARCH64): missing...
293
293
// powerpc - FIXME(POWERPC): missing...
294
- // arm-ios - iOS doesn't support segmented stacks yet.
295
- // openbsd - OpenBSD doesn't support segmented stacks.
294
+ // arm-ios - no segmented stacks.
295
+ // openbsd/bitrig/netbsd - no segmented stacks.
296
+ // x86-freebsd - no segmented stacks..
296
297
//
297
298
// This function might be called by runtime though
298
299
// so it is unsafe to unreachable, let's return a fixed constant.
299
300
#[ cfg( any( target_arch = "aarch64" ,
300
301
target_arch = "powerpc" ,
301
302
all( target_arch = "arm" , target_os = "ios" ) ,
303
+ all( target_arch = "x86" , target_os = "freebsd" ) ,
302
304
target_os = "bitrig" ,
303
305
target_os = "netbsd" ,
304
306
target_os = "openbsd" ) ) ]
0 commit comments