From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVGiT-0001VZ-0n for qemu-devel@nongnu.org; Mon, 05 Nov 2012 02:03:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVGiR-0007b1-Ub for qemu-devel@nongnu.org; Mon, 05 Nov 2012 02:03:24 -0500 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:49796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVGiR-0007ZN-NE for qemu-devel@nongnu.org; Mon, 05 Nov 2012 02:03:23 -0500 Date: Mon, 5 Nov 2012 08:03:05 +0100 From: Aurelien Jarno Message-ID: <20121105070305.GG31495@ohm.aurel32.net> References: <3e13749eef6fbeef0651adb2b26e088cb5289dd9.1351968499.git.blauwirbel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <3e13749eef6fbeef0651adb2b26e088cb5289dd9.1351968499.git.blauwirbel@gmail.com> Subject: Re: [Qemu-devel] [PATCH] target-mips: use ULL for 64 bit constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Sat, Nov 03, 2012 at 06:48:35PM +0000, Blue Swirl wrote: > Fix build on a 32 bit host: > CC mips-softmmu/target-mips/dsp_helper.o > /src/qemu/target-mips/dsp_helper.c: In function 'helper_dextr_rs_w': > /src/qemu/target-mips/dsp_helper.c:3556: error: integer constant is too large for 'long' type > /src/qemu/target-mips/dsp_helper.c: In function 'helper_extr_s_h': > /src/qemu/target-mips/dsp_helper.c:3656: error: integer constant is too large for 'long' type > > Signed-off-by: Blue Swirl > --- > target-mips/dsp_helper.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c > index b59133e..e7949c2 100644 > --- a/target-mips/dsp_helper.c > +++ b/target-mips/dsp_helper.c > @@ -3553,7 +3553,7 @@ target_ulong helper_dextr_rs_w(target_ulong ac, target_ulong shift, > if (temp128 == 0) { > temp[0] = 0x0FFFFFFFF; > } else { > - temp[0] = 0x0100000000; > + temp[0] = 0x0100000000ULL; > } > set_DSPControl_overflow_flag(1, 23, env); > } > @@ -3653,7 +3653,7 @@ target_ulong helper_extr_s_h(target_ulong ac, target_ulong shift, > if (temp > (int64_t)0x7FFF) { > temp = 0x00007FFF; > set_DSPControl_overflow_flag(1, 23, env); > - } else if (temp < (int64_t)0xFFFFFFFFFFFF8000) { > + } else if (temp < (int64_t)0xFFFFFFFFFFFF8000ULL) { > temp = 0xFFFF8000; > set_DSPControl_overflow_flag(1, 23, env); > } Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net