From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOoVG-0004I6-UW for qemu-devel@nongnu.org; Fri, 20 Feb 2015 09:24:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOoVC-0007Sc-PY for qemu-devel@nongnu.org; Fri, 20 Feb 2015 09:24:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOoVC-0007SW-Ih for qemu-devel@nongnu.org; Fri, 20 Feb 2015 09:24:22 -0500 Date: Fri, 20 Feb 2015 15:24:19 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20150220142418.GB3974@potion.brq.redhat.com> References: <1424441905-5735-1-git-send-email-rkrcmar@redhat.com> <1424441905-5735-3-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1424441905-5735-3-git-send-email-rkrcmar@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Walle 2015-02-20 15:18+0100, Radim Kr=C4=8Dm=C3=A1=C5=99: > diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c > @@ -164,6 +164,13 @@ output_queue_advance(MilkymistPFPUState *s) > static int pfpu_decode_insn(MilkymistPFPUState *s) > { > uint32_t pc =3D s->regs[R_PC]; > + > + if (pc > MICROCODE_WORDS) { Ugh, should have been '>=3D' here. > + error_report("milkymist_pfpu: too many instructions " > + "executed in microcode. No VECTOUT?"); > + return 0; > + } > + > uint32_t insn =3D s->microcode[pc];