Skip to content
Snippets Groups Projects
  • Alexander Monakov's avatar
    20a5b482
    libcpp: replace SSE4.2 helper with an SSSE3 one · 20a5b482
    Alexander Monakov authored
    Since the characters we are searching for (CR, LF, '\', '?') all have
    distinct ASCII codes mod 16, PSHUFB can help match them all at once.
    
    Directly use the new helper if __SSSE3__ is defined. It makes the other
    helpers unused, so mark them inline to prevent warnings.
    
    Rewrite and simplify init_vectorized_lexer.
    
    libcpp/ChangeLog:
    
    	* config.in: Regenerate.
    	* configure: Regenerate.
    	* configure.ac: Check for SSSE3 instead of SSE4.2.
    	* files.cc (read_file_guts): Bump padding to 64 if HAVE_SSSE3.
    	* lex.cc (search_line_acc_char): Mark inline, not "unused".
    	(search_line_sse2): Mark inline.
    	(search_line_sse42): Replace with...
    	(search_line_ssse3): ... this new function.  Adjust the use...
    	(init_vectorized_lexer): ... here.  Simplify.
    20a5b482
    History
    libcpp: replace SSE4.2 helper with an SSSE3 one
    Alexander Monakov authored
    Since the characters we are searching for (CR, LF, '\', '?') all have
    distinct ASCII codes mod 16, PSHUFB can help match them all at once.
    
    Directly use the new helper if __SSSE3__ is defined. It makes the other
    helpers unused, so mark them inline to prevent warnings.
    
    Rewrite and simplify init_vectorized_lexer.
    
    libcpp/ChangeLog:
    
    	* config.in: Regenerate.
    	* configure: Regenerate.
    	* configure.ac: Check for SSSE3 instead of SSE4.2.
    	* files.cc (read_file_guts): Bump padding to 64 if HAVE_SSSE3.
    	* lex.cc (search_line_acc_char): Mark inline, not "unused".
    	(search_line_sse2): Mark inline.
    	(search_line_sse42): Replace with...
    	(search_line_ssse3): ... this new function.  Adjust the use...
    	(init_vectorized_lexer): ... here.  Simplify.