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~