This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Compilation regression on older gcc + 32-bit host [Re: [PATCH] Add support for Tilera TILE-Gx processor (part 1/3: gdb)]
On Wed, 30 May 2012 21:55:08 +0200, Pedro Alves wrote:
> Here's the patch as checked in.
>
> gdb/
> * Makefile.in (ALL_TARGET_OBJS): Add tilegx-tdep.o and
> tilegx-linux-tdep.o.
> (ALLDEPFILES): Add tilegx-linux-nat.c, tilegx-tdep.c and
> tilegx-linux-tdep.c.
> * configure.tgt: Handle tilegx-*-linux*.
> * tilegx-tdep.h: New file.
> * tilegx-tdep.c: New file.
> * tilegx-linux-tdep.c: New file.
> * regformats/reg-tilegx.dat: New file.
On CentOS i386 (gcc-4.4.6-3.el6.i686):
tilegx-linux-tdep.c:59: error: integer constant is too large for ‘long’ type
tilegx-linux-tdep.c:60: error: integer constant is too large for ‘long’ type
I would put there ULL for ULONGEST although there was recent discusssion 'long
long' is not acceptable. But sourceware tree already has large number of
'long long' uses:
$ egrep -ri '[0-9] *U?LL\>' .|egrep -v '/(opcodes|libdecnumber)/'|wc -l
303
$ egrep -ri '[0-9] *U?LL\>' .|wc -l
15734
So I find 'long long' is perfectly valid for Sourceware tree.
Still the "right" fix would be below.
I will check it in with ULL today if no comments appear.
Thanks,
Jan
gdb/
2012-05-31 Jan Kratochvil <jan.kratochvil@redhat.com>
* tilegx-linux-tdep.c (tilegx_l): Use UINT64_C.
--- ./gdb/tilegx-linux-tdep.c 30 May 2012 19:31:44 -0000 1.1
+++ ./gdb/tilegx-linux-tdep.c 31 May 2012 08:43:23 -0000
@@ -56,8 +56,8 @@ static const struct tramp_frame tilegx_l
SIGTRAMP_FRAME,
8,
{
- { 0x00045fe551483000, -1 }, /* { moveli r10, 139 } */
- { 0x286b180051485000, -1 }, /* { swint1 } */
+ { UINT64_C (0x00045fe551483000), -1 }, /* { moveli r10, 139 } */
+ { UINT64_C (0x286b180051485000), -1 }, /* { swint1 } */
{ TRAMP_SENTINEL_INSN, -1 }
},
tilegx_linux_sigframe_init