From: Richard Henderson <rth@twiddle.net>
To: Chen Gang <chengang@emindsoft.com.cn>,
peter.maydell@linaro.org, cmetcalf@ezchip.com
Cc: qemu-devel@nongnu.org, Chen Gang <gang.chen.5i5j@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/4] target-tilegx: Add floating point shared functions
Date: Thu, 24 Dec 2015 12:01:39 -0800 [thread overview]
Message-ID: <567C4F23.8090004@twiddle.net> (raw)
In-Reply-To: <567C117D.9000900@emindsoft.com.cn>
On 12/24/2015 07:38 AM, Chen Gang wrote:
>
> On 12/24/15 06:51, Richard Henderson wrote:
>> On 12/23/2015 01:48 PM, chengang@emindsoft.com.cn wrote:
>>> +extern float_status fp_status;
>>
>> No. Locally declared in e.g. main_calc.
>>
>
> OK, thanks. Since fp_status need to be initialized to be 0, so I will
> declared it statically, too (need we consider about thread safe for it?
> I guess not).
While qemu is not currently thread-safe, there's work going on to make that
happen. There is no need to exacerbate the problem.
Also, I think using an on-stack automatic variable, initialized each time,
emphasizes the fact there there is no state that is preserved across operations.
This should really be as simple as
float_status fp_status = {
.float_rounding_mode = float_round_nearest_even
};
(I realize float_round_nearest_even is *also* zero, but humor me. At least the
other members are either flags or booleans.)
r~
next prev parent reply other threads:[~2015-12-24 20:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 21:48 [Qemu-devel] [PATCH v4 0/4] target-tilegx: Implement floating point instructions chengang
2015-12-23 21:48 ` [Qemu-devel] [PATCH v4 1/4] target-tilegx: Add floating point shared functions chengang
2015-12-23 22:51 ` Richard Henderson
2015-12-24 15:38 ` Chen Gang
2015-12-24 20:01 ` Richard Henderson [this message]
2015-12-25 13:05 ` Chen Gang
2015-12-23 21:48 ` [Qemu-devel] [PATCH v4 2/4] target-tilegx: Add single floating point implementation chengang
2015-12-23 23:07 ` Richard Henderson
2015-12-24 15:52 ` Chen Gang
2015-12-27 8:31 ` Chen Gang
2015-12-23 21:48 ` [Qemu-devel] [PATCH v4 3/4] target-tilegx: Add double " chengang
2015-12-23 21:48 ` [Qemu-devel] [PATCH v4 4/4] target-tilegx: Integrate floating pointer implementation chengang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=567C4F23.8090004@twiddle.net \
--to=rth@twiddle.net \
--cc=chengang@emindsoft.com.cn \
--cc=cmetcalf@ezchip.com \
--cc=gang.chen.5i5j@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.