Skip to content

Commit

Permalink
and a bit more docs for what the asm is doing
Browse files Browse the repository at this point in the history
  • Loading branch information
iximeow committed Jun 24, 2024
1 parent 8615380 commit 053b8c8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/display/display_sink/imp_x86.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! `imp_x86` has specialized copies to append short strings to strings. buffer sizing must be
//! handled by callers, in all cases.
//!
//! the structure of all implementations here is, essentially, to take the size of the data to
//! append and execute a copy for each bit set in that size, from highest to lowest. some bits are
//! simply never checked if the input is promised to never be that large - if a string to append is
//! only 0..7 bytes long, it is sufficient to only look at the low three bits to copy all bytes.
//!
//! in this way, it is slightly more efficient to right-size which append function is used, if the
//! maximum size of input strings can be bounded well. if the maximum size of input strings cannot
//! be bounded, you shouldn't be using these functions.
/// append `data` to `buf`, assuming `data` is less than 8 bytes and that `buf` has enough space
/// remaining to hold all bytes in `data`.
///
Expand Down

0 comments on commit 053b8c8

Please sign in to comment.