diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 13:02:24 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 13:02:24 +0000 |
| commit | 32429f2c371a88befb2952fa326a979c4c4453ec (patch) | |
| tree | bce217de3f324919698da6306c42c85dad28247e /util/sbase/grep.c | |
| parent | b3516e8c168af18d0cc320e70fbe804fe7739342 (diff) | |
util/nvmutil: remove the swap() function
directly handle swapping in word and set_word
in my testing, x86_64 and arm64 compilers actually produce
more efficient code this way. i previously only did a big
swap on the whole buffer on big-endian CPUs, and directly
accessed without swaps on little-endian, as an optimisation.
however, the old code is actually slower than what the
compiler produces, with the new code!
portability is retained with big-endian host CPUs and
little-endian host CPUs.
this also avoids the complication of memcpy and is just
generally extremely reliable by comparison.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/sbase/grep.c')
0 files changed, 0 insertions, 0 deletions
