This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: Bootstrap failure because of warning in tc-i386.c


On Fri, Dec 18, 2015 at 6:04 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>>>    I was trying to bootstrap the current mainline FSF gcc sources
>>>    yesterday, using a combined tree with the latest binutils sources,
>>>    when I ran into this error:
>
>
>> Can you tell me how to reproduce it?  I will take care of it.
>
>
> Bootstrap a 32-bit gcc on an x86_64 host using an integrated set of sources
> for mainline GCC and BINUTILS.  The failure should appear.
>
> Specifically I am running this script:
>
> #!/bin/bash
>
> CC="gcc -m32" CXX="g++ -m32" ABI="32" setarch i686 \
> /work/sources/gcc/current/configure \
>   --enable-languages=c,c++ \
>   --with-x=no \
>   --disable-multilib \
>   --prefix=`pwd`/install \
>   --quiet
>
> make clean stage3-bubble
>

I am testing this.

-- 
H.J.
---
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 1573043..deb66a6 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4218,6 +4218,9 @@ optimize_imm (void)
  i.op[op].imms->X_add_number =
   (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000);
       }
+#ifdef BFD64
+    /* Sign-extend 32-bit immediate number to 64-bit for 64-bit
+       BFD.  */
     if ((i.types[op].bitfield.imm32)
  && ((i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1))
     == 0))
@@ -4226,6 +4229,7 @@ optimize_imm (void)
  ^ ((offsetT) 1 << 31))
        - ((offsetT) 1 << 31));
       }
+#endif
     i.types[op]
       = operand_type_or (i.types[op],
  smallest_imm_type (i.op[op].imms->X_add_number));
@@ -4306,6 +4310,8 @@ optimize_disp (void)
  op_disp = (((op_disp & 0xffff) ^ 0x8000) - 0x8000);
  i.types[op].bitfield.disp64 = 0;
       }
+#ifdef BFD64
+    /* Optimize 64-bit displacement to 32-bit for 64-bit BFD.  */
     if (i.types[op].bitfield.disp32
  && (op_disp & ~(((offsetT) 2 << 31) - 1)) == 0)
       {
@@ -4316,6 +4322,7 @@ optimize_disp (void)
  op_disp = (op_disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31);
  i.types[op].bitfield.disp64 = 0;
       }
+#endif
     if (!op_disp && i.types[op].bitfield.baseindex)
       {
  i.types[op].bitfield.disp8 = 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]