commonlib: Add assembly optimization for ipchksum() on arm64
commit89fae18bf4e41e299a021a4c52688e42a022f2c6
authorJulius Werner <jwerner@chromium.org>
Wed, 31 Jan 2024 01:26:52 +0000 (30 17:26 -0800)
committerJulius Werner <jwerner@chromium.org>
Fri, 2 Feb 2024 22:48:59 +0000 (2 22:48 +0000)
tree73156649cc66cd599e194c931ba43e517f7668d8
parent177aee2c1f40ddc46e0037123ef811bd2fad1cc7
commonlib: Add assembly optimization for ipchksum() on arm64

This patch adds a bit of optimized assembly code to the ipchksum()
algorithm for arm64 targets in order to take advantage of larger load
sizes and the add-with-carry instruction. This improves execution speed
on a Cortex-A75 by more than 20x.

Change-Id: I9c7bbc9d7a1cd083ced62fe9222592243a796077
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80254
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Yidi Lin <yidilin@google.com>
src/commonlib/bsd/ipchksum.c