From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6345 invoked by alias); 31 May 2012 08:53:32 -0000 Received: (qmail 6337 invoked by uid 22791); 31 May 2012 08:53:31 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 May 2012 08:53:13 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4V8quhq031292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 May 2012 04:52:56 -0400 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4V8qpES031600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 31 May 2012 04:52:54 -0400 Date: Thu, 31 May 2012 08:53:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: Jeff Kenton , Joel Brobecker , gdb-patches@sourceware.org Subject: [patch] Compilation regression on older gcc + 32-bit host [Re: [PATCH] Add support for Tilera TILE-Gx processor (part 1/3: gdb)] Message-ID: <20120531085250.GA31740@host2.jankratochvil.net> References: <4FAD39A1.1000209@tilera.com> <20120514162046.GI10253@adacore.com> <4FBA4FD2.9090108@tilera.com> <4FBD1F67.9090609@redhat.com> <4FBE8B5E.6050800@tilera.com> <4FBFA26F.20002@redhat.com> <4FC4EA20.1040201@tilera.com> <4FC67B1C.6040700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: <4FC67B1C.6040700@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg01075.txt.bz2 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 * 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