@@ -218,36 +218,38 @@ if #[cfg(any(target_vendor = "apple", target_os = "netbsd", not(target_arch = "a
218
218
219
219
pub unsafe fn _Unwind_GetGR( ctx: * mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word {
220
220
let mut val: _Unwind_Word = core:: ptr:: null( ) ;
221
- _Unwind_VRS_Get( ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
222
- ( & raw mut val) as * mut c_void) ;
221
+ unsafe { _Unwind_VRS_Get( ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
222
+ ( & raw mut val) as * mut c_void) ; }
223
223
val
224
224
}
225
225
226
226
pub unsafe fn _Unwind_SetGR( ctx: * mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word) {
227
227
let mut value = value;
228
- _Unwind_VRS_Set( ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
229
- ( & raw mut value) as * mut c_void) ;
228
+ unsafe { _Unwind_VRS_Set( ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32,
229
+ ( & raw mut value) as * mut c_void) ; }
230
230
}
231
231
232
232
pub unsafe fn _Unwind_GetIP( ctx: * mut _Unwind_Context)
233
233
-> _Unwind_Word {
234
- let val = _Unwind_GetGR( ctx, UNWIND_IP_REG ) ;
234
+ let val = unsafe { _Unwind_GetGR( ctx, UNWIND_IP_REG ) } ;
235
235
val. map_addr( |v| v & !1 )
236
236
}
237
237
238
238
pub unsafe fn _Unwind_SetIP( ctx: * mut _Unwind_Context,
239
239
value: _Unwind_Word) {
240
240
// Propagate thumb bit to instruction pointer
241
- let thumb_state = _Unwind_GetGR( ctx, UNWIND_IP_REG ) . addr( ) & 1 ;
241
+ let thumb_state = unsafe { _Unwind_GetGR( ctx, UNWIND_IP_REG ) . addr( ) & 1 } ;
242
242
let value = value. map_addr( |v| v | thumb_state) ;
243
- _Unwind_SetGR( ctx, UNWIND_IP_REG , value) ;
243
+ unsafe { _Unwind_SetGR( ctx, UNWIND_IP_REG , value) ; }
244
244
}
245
245
246
246
pub unsafe fn _Unwind_GetIPInfo( ctx: * mut _Unwind_Context,
247
247
ip_before_insn: * mut c_int)
248
248
-> _Unwind_Word {
249
- * ip_before_insn = 0 ;
250
- _Unwind_GetIP( ctx)
249
+ unsafe {
250
+ * ip_before_insn = 0 ;
251
+ _Unwind_GetIP( ctx)
252
+ }
251
253
}
252
254
253
255
// This function also doesn't exist on Android or ARM/Linux, so make it a no-op
0 commit comments