@@ -227,24 +227,14 @@ pub unsafe fn record_sp_limit(limit: uint) {
227
227
}
228
228
229
229
// aarch64 - FIXME(AARCH64): missing...
230
- #[ cfg( target_arch = "aarch64" ) ]
231
- unsafe fn target_record_sp_limit ( _: uint ) {
232
- }
233
-
234
230
// powerpc - FIXME(POWERPC): missing...
235
- #[ cfg( target_arch = "powerpc" ) ]
236
- unsafe fn target_record_sp_limit ( _: uint ) {
237
- }
238
-
239
-
240
- // iOS segmented stack is disabled for now, see related notes
241
- #[ cfg( all( target_arch = "arm" , target_os = "ios" ) ) ] #[ inline( always) ]
242
- unsafe fn target_record_sp_limit ( _: uint ) {
243
- }
244
-
245
- #[ cfg( target_os = "openbsd" ) ] #[ inline( always) ]
231
+ // arm-ios - iOS segmented stack is disabled for now, see related notes
232
+ // openbsd - segmented stack is disabled
233
+ #[ cfg( any( target_arch = "aarch64" ,
234
+ target_arch = "powerpc" ,
235
+ all( target_arch = "arm" , target_os = "ios" ) ,
236
+ target_os = "openbsd" ) ) ]
246
237
unsafe fn target_record_sp_limit ( _: uint ) {
247
- // segmented stack is disabled
248
238
}
249
239
}
250
240
@@ -332,28 +322,18 @@ pub unsafe fn get_sp_limit() -> uint {
332
322
}
333
323
334
324
// aarch64 - FIXME(AARCH64): missing...
335
- #[ cfg( target_arch = "aarch64" ) ]
336
- unsafe fn target_get_sp_limit ( ) -> uint {
337
- 1024
338
- }
339
-
340
- // powepc - FIXME(POWERPC): missing...
341
- #[ cfg( target_arch = "powerpc" ) ]
342
- unsafe fn target_get_sp_limit ( ) -> uint {
343
- 1024
344
- }
345
-
346
- // iOS doesn't support segmented stacks yet. This function might
347
- // be called by runtime though so it is unsafe to mark it as
348
- // unreachable, let's return a fixed constant.
349
- #[ cfg( all( target_arch = "arm" , target_os = "ios" ) ) ] #[ inline( always) ]
350
- unsafe fn target_get_sp_limit ( ) -> uint {
351
- 1024
352
- }
353
-
354
- #[ cfg( target_os = "openbsd" ) ] #[ inline( always) ]
325
+ // powerpc - FIXME(POWERPC): missing...
326
+ // arm-ios - iOS doesn't support segmented stacks yet.
327
+ // openbsd - OpenBSD doesn't support segmented stacks.
328
+ //
329
+ // This function might be called by runtime though
330
+ // so it is unsafe to unreachable, let's return a fixed constant.
331
+ #[ cfg( any( target_arch = "aarch64" ,
332
+ target_arch = "powerpc" ,
333
+ all( target_arch = "arm" , target_os = "ios" ) ,
334
+ target_os = "openbsd" ) ) ]
335
+ #[ inline( always) ]
355
336
unsafe fn target_get_sp_limit ( ) -> uint {
356
- // segmented stack is disabled
357
337
1024
358
338
}
359
339
}
0 commit comments