From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRSBW-000611-HC for qemu-devel@nongnu.org; Mon, 17 Aug 2015 17:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRSBR-00029b-DW for qemu-devel@nongnu.org; Mon, 17 Aug 2015 17:43:14 -0400 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:33659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRSBR-00029X-9f for qemu-devel@nongnu.org; Mon, 17 Aug 2015 17:43:09 -0400 Received: by qkfj126 with SMTP id j126so51729722qkf.0 for ; Mon, 17 Aug 2015 14:43:09 -0700 (PDT) Sender: Richard Henderson References: <55D21A85.8080008@twiddle.net> From: Richard Henderson Message-ID: <55D25569.5000902@twiddle.net> Date: Mon, 17 Aug 2015 14:43:05 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Consult] tilegx: About floating point instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chen Gang Cc: Peter Maydell , walt@tilera.com, Chris Metcalf , =?UTF-8?Q?Andreas_F=c3=a4rber?= , qemu-devel On 08/17/2015 02:09 PM, Chen Gang wrote: > On 8/18/15 01:31, Richard Henderson wrote: >> On 08/15/2015 11:16 AM, Chen Gang wrote: >> >>> But what you said is really quite valuable to me!! we can treat the flag >>> as a caller saved context, then can let the caller can use callee freely >>> (in fact, I guess, the real hardware treats it as caller context, too). >>> >>> - we have to define the flag format based on the existing format in the >>> related docs and tilegx.md (reserve 0-20 and 25-31 bits). >>> >>> - We can only use 21-24 for mark addsub, mul, or typecast result. If >>> 21-24 bits are all zero, it means typecast result. For fsingle: 32-63 >>> bits is the input integer; for fdouble: srca is the input integer. >> >> Plausible. >> >>> >>> - For addsub and mul result, we use 32-63 bits for an index of resource >>> handler (like 'fd' returned by open). fsingle_addsub2, fsingle_mul1, >>> fdouble_mul_flags, fdouble_addsub allocate resource, and pack1 free. >> >> No, that's a bad idea. No state external to the inputs to the insns. ... > float32 val32s[TILEGX_F_COUNT]; /* results roudup array for fsingle */ > float64 val64s[TILEGX_F_COUNT]; /* results roudup array for fdouble */ I repeat: This is an extremely bad idea. I will certainly not sign off on any patch that includes this. r~