From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMKn-0003ZD-V2 for qemu-devel@nongnu.org; Tue, 08 Mar 2016 13:26:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adMKk-0002LJ-Mp for qemu-devel@nongnu.org; Tue, 08 Mar 2016 13:26:17 -0500 Received: from mail-qg0-x241.google.com ([2607:f8b0:400d:c04::241]:33468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMKk-0002LE-ID for qemu-devel@nongnu.org; Tue, 08 Mar 2016 13:26:14 -0500 Received: by mail-qg0-x241.google.com with SMTP id y89so1522611qge.0 for ; Tue, 08 Mar 2016 10:26:14 -0800 (PST) Sender: Richard Henderson References: <1457458958-23933-1-git-send-email-kbastian@mail.uni-paderborn.de> <1457458958-23933-2-git-send-email-kbastian@mail.uni-paderborn.de> From: Richard Henderson Message-ID: <56DF1942.1080004@twiddle.net> Date: Tue, 8 Mar 2016 13:26:10 -0500 MIME-Version: 1.0 In-Reply-To: <1457458958-23933-2-git-send-email-kbastian@mail.uni-paderborn.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/7] target-tricore: Add FPU infrastructure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bastian Koppelmann , qemu-devel@nongnu.org On 03/08/2016 12:42 PM, Bastian Koppelmann wrote: > +/* we don't care about input_denormal */ > +static inline uint8_t f_get_excp_flags(CPUTriCoreState *env) > +{ > + return env->fp_status.float_exception_flags & 0xbf; > +} No magic numbers please. It's a long list, but please or all of the named flags together. > + if (flags & float_flag_invalid) { > + env->FPU_FI = (flags & float_flag_invalid) << 31; > + } You know that float_flag_invalid is set; you just tested it. Otherwise you're relying on float_flag_invalid being 1. You know, you don't have to keep setting these to (1 << 31) either; -1 works just as well. r~