qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Consult] tilegx: About floating point instructions


From: Richard Henderson
Subject: Re: [Qemu-devel] [Consult] tilegx: About floating point instructions
Date: Mon, 17 Aug 2015 14:43:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]