Skip to content

Commit 4f77170

Browse files
authored
formatting
1 parent 1df0d1c commit 4f77170

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/mem/x86_64.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ pub unsafe fn compare_bytes(a: *const u8, b: *const u8, n: usize) -> i32 {
173173
c16(a.cast(), b.cast(), n)
174174
}
175175

176-
177176
// In order to process more than on byte simultaneously when executing strlen,
178177
// two things must be considered:
179178
// * An n byte read with an n-byte aligned address will never cross
@@ -190,7 +189,7 @@ pub unsafe fn c_string_length(s: *const core::ffi::c_char) -> usize {
190189
use core::arch::x86_64::{__m128i, _mm_cmpeq_epi8, _mm_movemask_epi8, _mm_set1_epi8};
191190

192191
let mut n = 0;
193-
192+
194193
// The use of _mm_movemask_epi8 and company allow for speedups,
195194
// but they aren't cheap by themselves. Thus, possibly small strings
196195
// are handled in simple loops.
@@ -266,11 +265,10 @@ pub unsafe fn c_string_length(mut s: *const core::ffi::c_char) -> usize {
266265
if *s == 0 {
267266
return n;
268267
}
269-
270268
n += 1;
271269
s = s.add(1);
272270
}
273-
271+
274272
// Check bytes in steps of eight until a zero
275273
// byte is discovered.
276274

0 commit comments

Comments
 (0)