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

[obv] Fix non-gcc build regression due to my amd64-xmm-skip [Re: FreeBSD broken build]


Hi Andreas,

On Tue, 13 Sep 2011 09:41:54 +0200, Andreas Tobler wrote:
> this commit http://sourceware.org/ml/gdb-cvs/2011-09/msg00056.html
> broke builds where one uses (has to use) gcc < 4.3. Afaik, gcc-4.3 is the
> first compiler which supports binary constants.
[...]
> ../../src/gdb/amd64-tdep.c:1967:33: error: invalid suffix "b00111111" on integer constant
> 
> Yes, I can use a newer gcc. But I thought I'd let you know.

this is sure not acceptable, sorry.

Checked in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-09/msg00072.html

--- src/gdb/ChangeLog	2011/09/12 21:24:47	1.13323
+++ src/gdb/ChangeLog	2011/09/13 08:26:05	1.13324
@@ -1,3 +1,8 @@
+2011-09-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix compatibility with gcc < 4.3 and non-gcc compilers.
+	* amd64-tdep.c (amd64_skip_xmm_prologue): Convert 0b constants.
+
 2011-09-12  Pedro Alves  <pedro@codesourcery.com>
 	    Matt Rice  <ratmice@gmail.com>
 
--- src/gdb/amd64-tdep.c	2011/09/09 19:41:13	1.93
+++ src/gdb/amd64-tdep.c	2011/09/13 08:26:11	1.94
@@ -1962,17 +1962,19 @@
   offset = 4;
   for (xmmreg = 0; xmmreg < 8; xmmreg++)
     {
-      /* movaps %xmmreg?,-0x??(%rbp) */
+      /* 0x0f 0x29 0b??000101 movaps %xmmreg?,-0x??(%rbp) */
       if (buf[offset] != 0x0f || buf[offset + 1] != 0x29
-          || (buf[offset + 2] & 0b00111111) != (xmmreg << 3 | 0b101))
+          || (buf[offset + 2] & 0x3f) != (xmmreg << 3 | 0x5))
 	return pc;
 
-      if ((buf[offset + 2] & 0b11000000) == 0b01000000)
+      /* 0b01?????? */
+      if ((buf[offset + 2] & 0xc0) == 0x40)
 	{
 	  /* 8-bit displacement.  */
 	  offset += 4;
 	}
-      else if ((buf[offset + 2] & 0b11000000) == 0b10000000)
+      /* 0b10?????? */
+      else if ((buf[offset + 2] & 0xc0) == 0x80)
 	{
 	  /* 32-bit displacement.  */
 	  offset += 7;


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