This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello! OK, here is the controversial patch that enables cld instruction with -mcld. It includes --enable-cld configure option, and in this case -mno-cld disables generation of cld instructions. 2008-05-20 Uros Bizjak <ubizjak@gmail.com> PR target/36079 * configure.ac: Handle --enable-cld. * configure.in: Regenerate. * configure.ac: Ditto. * config/i386/i386.h (TARGET_CLD): New define. (struct machine_function): Add needs_cld field. (ix86_current_function_needs_cld): New define. * config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant. ("cld"): New isns pattern. ("strmov_singleop"): Set ix86_current_function_needs_cld flag. ("rep_mov"): Ditto. ("strset_singleop"): Ditto. ("rep_stos"): Ditto. ("cmpstrnqi_nz_1"): Ditto. ("cmpstrnqi_1"): Ditto. ("strlenqi_1"): Ditto. * config/i386/i386.opt (mcld, mno-cld): New options. * config/i386/i386.c (ix86_expand_prologue): Emit cld insn for when ix86_current_function_needs_cld is set and when combination of configure and compile options allow it. The patch was bootstrapped and regression tested on i686-pc-linux-gnu a month or so ago. Currently vanila (without patch!) gcc-4_3 branch doesn't build for me, it dies with: gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-svn/branches/gcc-4_3-branch/gcc -I../../gcc-svn/branches/gcc-4_3-branch/gcc/build -I../../gcc-svn/branches/gcc-4_3-branch/gcc/../include -I../../gcc-svn/branches/gcc-4_3-branch/gcc/../libcpp/include -I/usr/local/include -I../../gcc-svn/branches/gcc-4_3-branch/gcc/../libdecnumber -I../../gcc-svn/branches/gcc-4_3-branch/gcc/../libdecnumber/bid -I../libdecnumber -o build/errors.o ../../gcc-svn/branches/gcc-4_3-branch/gcc/errors.c build/genmodes -h > tmp-modes.h /bin/sh: build/genmodes: No such file or directory gmake[3]: *** [s-modes-h] Error 127 Uros.
Attachment:
cld.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |