kernel/x86[_64]: remove get_optimized_functions from cpu modules

Operating Systems / Haiku - Paweł Dziepak [quarnos.org] - 14 September 2014 12:16 UTC

The possibility to specify custom memcpy and memset implementations in cpu modules is currently unused and there is generally no point in such feature.

There are only 2 x86 vendors that really matter and there isn't
very big difference in performance of the generic optmized versions of these funcions across different models. Even if we wanted different
versions of memset and memcpy depending on the processor model or features much better solution would be to use STT_GNU_IFUNC and save one indirect call.

Long story short, we don't really benefit in any way from get_optimized_functions and the feature it implements and it only adds unnecessary complexity to the code.

6156a50 kernel/x86[_64]: remove get_optimized_functions from cpu modules
headers/private/kernel/arch/x86/arch_cpu.h | 9 -----
src/system/kernel/arch/x86/arch_cpu.cpp | 41 ++++-------------------
src/system/kernel/arch/x86/asm_offsets.cpp | 6 ----
src/system/kernel/lib/arch/x86/arch_string.S | 33 +++---------------
src/system/kernel/lib/arch/x86_64/arch_string.S | 21 +++---------
5 files changed, 16 insertions(+), 94 deletions(-)

Upstream: cgit.haiku-os.org


  • Share