@@ -139,7 +139,6 @@ pub unsafe fn record_os_managed_stack_bounds(stack_lo: usize, _stack_hi: usize)
139
139
pub unsafe fn record_sp_limit ( limit : usize ) {
140
140
return target_record_sp_limit ( limit) ;
141
141
142
- // x86-64
143
142
#[ cfg( all( target_arch = "x86_64" ,
144
143
any( target_os = "macos" , target_os = "ios" ) ) ) ]
145
144
#[ inline( always) ]
@@ -164,7 +163,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
164
163
asm ! ( "movq $0, %fs:32" :: "r" ( limit) :: "volatile" )
165
164
}
166
165
167
- // x86
168
166
#[ cfg( all( target_arch = "x86" ,
169
167
any( target_os = "macos" , target_os = "ios" ) ) ) ]
170
168
#[ inline( always) ]
@@ -182,8 +180,8 @@ pub unsafe fn record_sp_limit(limit: usize) {
182
180
unsafe fn target_record_sp_limit ( _: usize ) {
183
181
}
184
182
185
- // mips, arm - Some brave soul can port these to inline asm, but it's over
186
- // my head personally
183
+ // mips, arm - The implementations are a bit big for inline asm!
184
+ // They can be found in src/rt/arch/$target_arch/record_sp.S
187
185
#[ cfg( any( target_arch = "mips" ,
188
186
target_arch = "mipsel" ,
189
187
all( target_arch = "arm" , not( target_os = "ios" ) ) ) ) ]
@@ -221,7 +219,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
221
219
pub unsafe fn get_sp_limit ( ) -> usize {
222
220
return target_get_sp_limit ( ) ;
223
221
224
- // x86-64
225
222
#[ cfg( all( target_arch = "x86_64" ,
226
223
any( target_os = "macos" , target_os = "ios" ) ) ) ]
227
224
#[ inline( always) ]
@@ -255,7 +252,6 @@ pub unsafe fn get_sp_limit() -> usize {
255
252
return limit;
256
253
}
257
254
258
- // x86
259
255
#[ cfg( all( target_arch = "x86" ,
260
256
any( target_os = "macos" , target_os = "ios" ) ) ) ]
261
257
#[ inline( always) ]
@@ -278,8 +274,8 @@ pub unsafe fn get_sp_limit() -> usize {
278
274
return 1024 ;
279
275
}
280
276
281
- // mips, arm - Some brave soul can port these to inline asm, but it's over
282
- // my head personally
277
+ // mips, arm - The implementations are a bit big for inline asm!
278
+ // They can be found in src/rt/arch/$target_arch/record_sp.S
283
279
#[ cfg( any( target_arch = "mips" ,
284
280
target_arch = "mipsel" ,
285
281
all( target_arch = "arm" , not( target_os = "ios" ) ) ) ) ]
0 commit comments