From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register.
Date: Mon, 21 Dec 2009 13:02:40 -0800 [thread overview]
Message-ID: <4B2FE270.80007@twiddle.net> (raw)
In-Reply-To: <20091221103305.GB4990@volta.aurel32.net>
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
On 12/21/2009 02:33 AM, Aurelien Jarno wrote:
> On Sat, Dec 19, 2009 at 03:17:16PM -0800, Richard Henderson wrote:
>> Signed-off-by: Richard Henderson<rth@twiddle.net>
>> ---
>> linux-user/main.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/linux-user/main.c b/linux-user/main.c
>> index 12502ad..b67662c 100644
>> --- a/linux-user/main.c
>> +++ b/linux-user/main.c
>> @@ -3052,6 +3052,8 @@ int main(int argc, char **argv, char **envp)
>> env->ir[30] = regs->usp;
>> env->pc = regs->pc;
>> env->unique = regs->unique;
>> + cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
>> + | FPCR_UNFD | FPCR_INED | FPCR_DNOD));
>> }
>
> This cpu initialization which does not depends on the binary being run
> is usually done in target-*/translate.c, using #if defined
> (CONFIG_USER_ONLY).
I didn't want to assume that bsd-user initializes the fpcr to the same
value. However, they probably do. This appears to be what you wanted.
r~
[-- Attachment #2: commit-fpcr.txt --]
[-- Type: text/plain, Size: 790 bytes --]
commit 033df7a558acdf39d81681f3858f13ebe2a92a6e
Author: Richard Henderson <rth@twiddle.net>
Date: Mon Dec 21 12:48:43 2009 -0800
target-alpha: Initialize fpcr.
Linux, at least, disables exceptions by default.
Signed-off-by: Richard Henderson <rth@twiddle.net>
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 5e0647b..87813e7 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -2748,6 +2748,8 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
env->ps = 0x1F00;
#if defined (CONFIG_USER_ONLY)
env->ps |= 1 << 3;
+ cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
+ | FPCR_UNFD | FPCR_INED | FPCR_DNOD));
#endif
pal_init(env);
/* Initialize IPR */
prev parent reply other threads:[~2009-12-21 21:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-19 23:17 [Qemu-devel] [PATCH 1/3] target-alpha: Emit tcg debug_insn_start Richard Henderson
2009-12-19 23:17 ` [Qemu-devel] [PATCH 2/3] linux-user: Add aliases for some Alpha syscalls Richard Henderson
2009-12-19 23:17 ` [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register Richard Henderson
2009-12-21 10:33 ` Aurelien Jarno
2009-12-21 21:02 ` Richard Henderson [this message]
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=4B2FE270.80007@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).