From a8260ebeae0f817bc7adf99cf62b604b1e2d3895 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 24 Aug 2024 17:37:13 +0300 Subject: libcpp: deduplicate definition of padding size Tie together the two functions that ensure tail padding with search_line_ssse3 via CPP_BUFFER_PADDING macro. libcpp/ChangeLog: * internal.h (CPP_BUFFER_PADDING): New macro; use it ... * charset.cc (_cpp_convert_input): ...here, and ... * files.cc (read_file_guts): ...here, and ... * lex.cc (search_line_ssse3): here. --- libcpp/files.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libcpp/files.cc') diff --git a/libcpp/files.cc b/libcpp/files.cc index 3775091..fc66b9c 100644 --- a/libcpp/files.cc +++ b/libcpp/files.cc @@ -732,11 +732,7 @@ read_file_guts (cpp_reader *pfile, _cpp_file *file, location_t loc, the majority of C source files. */ size = 8 * 1024; -#ifdef HAVE_SSSE3 - pad = 64; -#else - pad = 16; -#endif + pad = CPP_BUFFER_PADDING; /* The '+ PAD' here is space for the final '\n' and PAD-1 bytes of padding, allowing search_line_fast to use (possibly misaligned) vector loads. */ buf = XNEWVEC (uchar, size + pad); -- cgit v1.1