qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] target-alpha: Emit tcg debug_insn_start.
@ 2009-12-19 23:17 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
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2009-12-19 23:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/translate.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 45cb697..5e0647b 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -2627,6 +2627,11 @@ static inline void gen_intermediate_code_internal(CPUState *env,
             gen_io_start();
         insn = ldl_code(ctx.pc);
         num_insns++;
+
+	if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
+            tcg_gen_debug_insn_start(ctx.pc);
+        }
+
         ctx.pc += 4;
         ret = translate_one(ctxp, insn);
         if (ret != 0)
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/3] linux-user: Add aliases for some Alpha syscalls
  2009-12-19 23:17 [Qemu-devel] [PATCH 1/3] target-alpha: Emit tcg debug_insn_start Richard Henderson
@ 2009-12-19 23:17 ` Richard Henderson
  2009-12-19 23:17 ` [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2009-12-19 23:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

Alpha always used 32-bit uids, but never renamed the syscalls
to match i386 when 32-bit uids were added there.  This enables
the proper bits in syscall.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/alpha/syscall_nr.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
index d3c19cc..7182223 100644
--- a/linux-user/alpha/syscall_nr.h
+++ b/linux-user/alpha/syscall_nr.h
@@ -411,3 +411,11 @@
 #define TARGET_NR_signalfd			476
 #define TARGET_NR_timerfd			477
 #define TARGET_NR_eventfd			478
+
+/* The following aliases are defined in order to match up with the
+   standard i386 syscalls implemented in syscalls.c.  */
+#define TARGET_NR_chown32	TARGET_NR_chown
+#define TARGET_NR_setuid32	TARGET_NR_setuid
+#define TARGET_NR_setgid32	TARGET_NR_setgid
+#define TARGET_NR_setfsuid32	TARGET_NR_setfsuid
+#define TARGET_NR_setfsgid32	TARGET_NR_setfsgid
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register.
  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 ` Richard Henderson
  2009-12-21 10:33   ` Aurelien Jarno
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2009-12-19 23:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

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));
     }
 #elif defined(TARGET_CRIS)
     {
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register.
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2009-12-21 10:33 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

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).

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 3/3] linux-user: Initialize Alpha FPCR register.
  2009-12-21 10:33   ` Aurelien Jarno
@ 2009-12-21 21:02     ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2009-12-21 21:02 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

[-- 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 */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-21 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).