Remove the FP area initialization code
When using the optimized string lib in Occlum, the memset function would use xmm0 register, as the result, the FP area initialization code would modify the FP area before saving it. So just ignor the FP area initialization code.
This commit is contained in:
parent
5f05c16700
commit
d63bfac61c
@ -908,11 +908,11 @@ pub struct FpRegs {
|
||||
impl FpRegs {
|
||||
/// Save the current CPU floating pointer states to an instance of FpRegs
|
||||
pub fn save() -> Self {
|
||||
let mut fpregs = FpRegs {
|
||||
inner: Aligned([0u8; 512]),
|
||||
};
|
||||
unsafe { _fxsave(fpregs.inner.as_mut_ptr()) };
|
||||
fpregs
|
||||
let mut fpregs = MaybeUninit::<Self>::uninit();
|
||||
unsafe {
|
||||
_fxsave(fpregs.as_mut_ptr() as *mut u8);
|
||||
fpregs.assume_init()
|
||||
}
|
||||
}
|
||||
|
||||
/// Restore the current CPU floating pointer states from this FpRegs instance
|
||||
|
Loading…
Reference in New Issue
Block a user