[PATCH, i386]: Fix PR 36079 [4.3/4.4 Regression] cld instruction is not emitted anymore.

Paolo Bonzini bonzini@gnu.org
Tue May 20 17:03:00 GMT 2008


Jakub Jelinek wrote:
> On Tue, May 20, 2008 at 02:47:15PM +0200, Uros Bizjak wrote:
>> 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.
> 
> The configury bits are IMHO too ugly

Yes, the problem is that configure.ac is polluted with target-specific 
stuff.  You can instead add a

   if test $enable_cld = yes; then
      tm_defines=${tm_defines} USE_IX86_CLD=1"
   fi

in config.gcc around this place:

case ${target} in
x86_64-*-*)
         tm_file="i386/biarch64.h ${tm_file}"
         ;;
esac

Paolo



More information about the Gcc-patches mailing list