@@ -391,58 +391,54 @@ pub unsafe fn record_sp_limit(limit: uint) {
391391/// As with the setter, this function does not have a __morestack header and can
392392/// therefore be called in a "we're out of stack" situation.
393393#[ inline( always) ]
394- // NOTE: after the next snapshot, can remove the initialization before inline
395- // assembly due to an improvement in how it's handled, then this specific
396- // allow directive should get removed.
397- #[ allow( dead_assignment) ]
398394pub unsafe fn get_sp_limit ( ) -> uint {
399395 return target_get_sp_limit ( ) ;
400396
401397 // x86-64
402398 #[ cfg( target_arch = "x86_64" , target_os = "macos" ) ] #[ inline( always) ]
403399 unsafe fn target_get_sp_limit ( ) -> uint {
404- let mut limit: uint = 0 ;
400+ let limit;
405401 asm ! ( "movq $$0x60+90*8, %rsi
406402 movq %gs:(%rsi), $0" : "=r" ( limit) :: "rsi" : "volatile" ) ;
407403 return limit;
408404 }
409405 #[ cfg( target_arch = "x86_64" , target_os = "linux" ) ] #[ inline( always) ]
410406 unsafe fn target_get_sp_limit ( ) -> uint {
411- let mut limit: uint = 0 ;
407+ let limit;
412408 asm ! ( "movq %fs:112, $0" : "=r" ( limit) :: : "volatile" ) ;
413409 return limit;
414410 }
415411 #[ cfg( target_arch = "x86_64" , target_os = "win32" ) ] #[ inline( always) ]
416412 unsafe fn target_get_sp_limit ( ) -> uint {
417- let mut limit: uint = 0 ;
413+ let limit;
418414 asm ! ( "movq %gs:0x28, $0" : "=r" ( limit) :: : "volatile" ) ;
419415 return limit;
420416 }
421417 #[ cfg( target_arch = "x86_64" , target_os = "freebsd" ) ] #[ inline( always) ]
422418 unsafe fn target_get_sp_limit ( ) -> uint {
423- let mut limit: uint = 0 ;
419+ let limit;
424420 asm ! ( "movq %fs:24, $0" : "=r" ( limit) :: : "volatile" ) ;
425421 return limit;
426422 }
427423
428424 // x86
429425 #[ cfg( target_arch = "x86" , target_os = "macos" ) ] #[ inline( always) ]
430426 unsafe fn target_get_sp_limit ( ) -> uint {
431- let mut limit: uint = 0 ;
427+ let limit;
432428 asm ! ( "movl $$0x48+90*4, %eax
433429 movl %gs:(%eax), $0" : "=r" ( limit) :: "eax" : "volatile" ) ;
434430 return limit;
435431 }
436432 #[ cfg( target_arch = "x86" , target_os = "linux" ) ]
437433 #[ cfg( target_arch = "x86" , target_os = "freebsd" ) ] #[ inline( always) ]
438434 unsafe fn target_get_sp_limit ( ) -> uint {
439- let mut limit: uint = 0 ;
435+ let limit;
440436 asm ! ( "movl %gs:48, $0" : "=r" ( limit) :: : "volatile" ) ;
441437 return limit;
442438 }
443439 #[ cfg( target_arch = "x86" , target_os = "win32" ) ] #[ inline( always) ]
444440 unsafe fn target_get_sp_limit ( ) -> uint {
445- let mut limit: uint = 0 ;
441+ let limit;
446442 asm ! ( "movl %fs:0x14, $0" : "=r" ( limit) :: : "volatile" ) ;
447443 return limit;
448444 }
0 commit comments