Skip to content

Commit

Permalink
add rustfmt.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sin-tel committed Dec 13, 2024
1 parent bc0e34e commit 9e1ff5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hard_tabs = true
match_block_trailing_comma = true
use_field_init_shorthand = true
max_width = 100
use_small_heuristics = "Max"
chain_width = 70
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,15 @@ impl DenormalGuard {
let mxcsr = unsafe { _mm_getcsr() };
unsafe { _mm_setcsr(mxcsr | X86_MASK) };

DenormalGuard {
mxcsr,
_not_send_sync: PhantomData,
}
DenormalGuard { mxcsr, _not_send_sync: PhantomData }
}
#[cfg(target_arch = "aarch64")]
{
let mut fpcr: u64;
unsafe { std::arch::asm!("mrs {}, fpcr", out(reg) fpcr) };
unsafe { std::arch::asm!("msr fpcr, {}", in(reg) fpcr | AARCH64_MASK) };

DenormalGuard {
fpcr,
_not_send_sync: PhantomData,
}
DenormalGuard { fpcr, _not_send_sync: PhantomData }
}
}
}
Expand Down

0 comments on commit 9e1ff5a

Please sign in to comment.