* Use a no-asm feature instead of an asm feature
This works better as core/alloc/std have trouble supporting default
featues in this crate.
Signed-off-by: Joe Richey <joerichey@google.com>
* Have no-asm disable arm assembly intrinsics
Signed-off-by: Joe Richey <joerichey@google.com>
* Reorganize mem functions
This reduces the amount of platform-specific code
Signed-off-by: Joe Richey <joerichey@google.com>
* Use ERMSB implementations if the feature is set
Signed-off-by: Joe Richey <joerichey@google.com>
* Add non-aligned benchmarks
Signed-off-by: Joe Richey <joerichey@google.com>
* mem: Move mem* functions to separate directory
Signed-off-by: Joe Richey <joerichey@google.com>
* memcpy: Create separate memcpy.rs file
Signed-off-by: Joe Richey <joerichey@google.com>
* benches: Add benchmarks for mem* functions
This allows comparing the "normal" implementations to the
implementations provided by this crate.
Signed-off-by: Joe Richey <joerichey@google.com>
* mem: Add REP MOVSB/STOSB implementations
The assembly generated seems correct:
https://rust.godbolt.org/z/GGnec8
Signed-off-by: Joe Richey <joerichey@google.com>
* mem: Add documentations for REP string insturctions
Signed-off-by: Joe Richey <joerichey@google.com>
* Use quad-word rep string instructions
Signed-off-by: Joe Richey <joerichey@google.com>
* Prevent panic when compiled in debug mode
Signed-off-by: Joe Richey <joerichey@google.com>
* Add tests for mem* functions
Signed-off-by: Joe Richey <joerichey@google.com>
* Add build/test with the "asm" feature
Signed-off-by: Joe Richey <joerichey@google.com>
* Add byte length to Bencher
Signed-off-by: Joe Richey <joerichey@google.com>
1. In UEFI x86 arch, probestack need triple underscore.
2. In UEFI, probestack function do things like _chkstk(in MSVC).
MSVC x32's _chkstk and cygwin/mingw's _alloca adjust %esp themselves
MSVC x64's __chkstk and cygwin/mingw's ___chkstk_ms do not adjust
%rsp themselves.
But current probestack doesn't adjust esp. And LLVM doesn't generate
sub %eax, %esp after probestack. So we adjust esp in probestack like
MSVC x32's _chkstk.
* add 32 bit shift instructions to src/int/shift.rs
__ashlsi3
__ashrsi3
__lshrsi3
* add int_impl! for 16 bit numbers and large_int! for i32 and u32
* add tests in testcrate/build.rs
https://github.com/rust-lang/rust/pull/72700 caused the existing
`allow(improper_ctypes)` guard to stop working, we now need
`allow(improper_ctypes_definitions)` instead.
We keep the old one to avoid any issues with older nightlies.
Signed-off-by: Joe Richey <joerichey@google.com>
* Expand wasm32 testing on CI
Run the full `run.sh` test script to get full assertions, including that
nothing in the wasm compiler-builtins is panicking. Unfortunately it's
currently panicking, so this is good to weed out!
* Update libm