[PATCH 1/2, i386] cmpstrnsi needs string length

Aaron Sawdey acsawdey@linux.vnet.ibm.com
Tue Nov 1 22:29:00 GMT 2016


This patch adds a test to the cmpstrnsi pattern in i386.md so that it
will bail out (FAIL) if neither of the strings is a constant string. It
can only work as a proper strncmp if the length is not longer than both
of the strings. This change is required if expand_builtin_strncmp is
going to try expansion of strncmp when neither string argument is
constant.

-- 
Aaron Sawdey, Ph.D.  acsawdey@linux.vnet.ibm.com
050-2/C113  (507) 253-7520 home: 507/263-0782
IBM Linux Technology Center - PPC Toolchain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmpstrnsi_i386.patch
Type: text/x-patch
Size: 1192 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161101/1af69b65/attachment.bin>


More information about the Gcc-patches mailing list