qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] powerpc (debian/sid) woes
@ 2003-07-28 20:09 Christof Petig
  2003-07-29 20:57 ` Fabrice Bellard
  0 siblings, 1 reply; 7+ messages in thread
From: Christof Petig @ 2003-07-28 20:09 UTC (permalink / raw)
  To: qemu-devel

Hi,

Since 0.1.6 I encountered occasional compile/link failures and various 
errors on powerpc. Since I thought them to be temporary I did not spend 
much thought about it and waited for a new (and working version). But 
looking more closely these problems seem to persist ...

Intermediate problems:
since 2003-5-27 18:50:  dyngen: could not find .sdata section

but since 2003-5-30 18:50 (and up to current CVS):
The process loops forever (gcc-3.3,-O2) or encounters an illegal 
instruction (gcc-3.3, -O0).

Since debian shipped more actual kernel headers with glibc, I am no more 
able to try gcc-2.95 (gcc-3.2 fails like gcc-3.3):

syscall.c: In function `_llseek':
syscall.c:95: more than 10 operands in `asm'

(looks nonsense to me)

But in any case I would like to have 3.3 working.

Offending code attached.

But what is even nagging me more is the fact that I don't have a working 
newer wine than the one you offer for download. I tried to download 
.debs from unstable, as of 2003-4-11 it's ls worked. Since 0.1.6 it 
segfaults.

Has anybody had any recent success with powerpc, a recent wine, a recent 
compiler and a recent glibc? ;-)

    Christof

Working (0.1.6)
IN:
0x300a9990:  pushl  %esp
0x300a9991:  call   0x0

AFTER FLAGS OPT:
0x0000: movl_T0_ESP
0x0001: pushl_T0
0x0002: movl_T0_im 0x300a9996
0x0003: pushl_T0
0x0004: jmp_im 0x300a99e8
0x0005: end

OUT: [size=52]
0x60292600:  mr r24,r20
0x60292604:  addi       r9,r20,-4
0x60292608:  stwbrx     r24,r0,r9
0x6029260c:  mr r20,r9
0x60292610:  lis        r9,12299
0x60292614:  addi       r24,r9,-26218
0x60292618:  addi       r9,r20,-4
0x6029261c:  stwbrx     r24,r0,r9
0x60292620:  mr r20,r9
0x60292624:  lis        r9,12299
0x60292628:  addi       r9,r9,-26136
0x6029262c:  stw        r9,32(r27)
0x60292630:  blr

Failing (current CVS):
AFTER FLAGS OPT:
0x0000: movl_T0_ESP
0x0001: pushl_T0
0x0002: movl_T0_im 0x300a9996
0x0003: pushl_T0
0x0004: jmp_tb_next 0x601958f0 0x300a99e8
0x0005: end

OUT: [size=64]
0x603358f0:  mr r24,r20
0x603358f4:  addi       r9,r20,-4
0x603358f8:  stwbrx     r24,r0,r9
0x603358fc:  mr r20,r9
0x60335900:  lis        r9,12299
0x60335904:  addi       r24,r9,-26218
0x60335908:  addi       r9,r20,-4
0x6033590c:  stwbrx     r24,r0,r9
0x60335910:  mr r20,r9
0x60335914:  b  6045EEDC		<<< strange?
0x60335918:  lis        r11,24601
0x6033591c:  lis        r9,12299
0x60335920:  addi       r24,r11,22768
0x60335924:  addi       r9,r9,-26136
0x60335928:  stw        r9,32(r27)
0x6033592c:  blr

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-07-28 20:09 [Qemu-devel] powerpc (debian/sid) woes Christof Petig
@ 2003-07-29 20:57 ` Fabrice Bellard
  2003-07-29 21:33   ` Jocelyn Mayer
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Bellard @ 2003-07-29 20:57 UTC (permalink / raw)
  To: qemu-devel

The problem is that I don't have access to a gcc-3.3 powerpc based system...

Fabrice.

Christof Petig wrote:
> Hi,
> 
> Since 0.1.6 I encountered occasional compile/link failures and various 
> errors on powerpc. Since I thought them to be temporary I did not spend 
> much thought about it and waited for a new (and working version). But 
> looking more closely these problems seem to persist ...
> 
> Intermediate problems:
> since 2003-5-27 18:50:  dyngen: could not find .sdata section
> 
> but since 2003-5-30 18:50 (and up to current CVS):
> The process loops forever (gcc-3.3,-O2) or encounters an illegal 
> instruction (gcc-3.3, -O0).
> 
> Since debian shipped more actual kernel headers with glibc, I am no more 
> able to try gcc-2.95 (gcc-3.2 fails like gcc-3.3):
> 
> syscall.c: In function `_llseek':
> syscall.c:95: more than 10 operands in `asm'
> 
> (looks nonsense to me)
> 
> But in any case I would like to have 3.3 working.
> 
> Offending code attached.
> 
> But what is even nagging me more is the fact that I don't have a working 
> newer wine than the one you offer for download. I tried to download 
> .debs from unstable, as of 2003-4-11 it's ls worked. Since 0.1.6 it 
> segfaults.
> 
> Has anybody had any recent success with powerpc, a recent wine, a recent 
> compiler and a recent glibc? ;-)
> 
>    Christof
> 
> Working (0.1.6)
> IN:
> 0x300a9990:  pushl  %esp
> 0x300a9991:  call   0x0
> 
> AFTER FLAGS OPT:
> 0x0000: movl_T0_ESP
> 0x0001: pushl_T0
> 0x0002: movl_T0_im 0x300a9996
> 0x0003: pushl_T0
> 0x0004: jmp_im 0x300a99e8
> 0x0005: end
> 
> OUT: [size=52]
> 0x60292600:  mr r24,r20
> 0x60292604:  addi       r9,r20,-4
> 0x60292608:  stwbrx     r24,r0,r9
> 0x6029260c:  mr r20,r9
> 0x60292610:  lis        r9,12299
> 0x60292614:  addi       r24,r9,-26218
> 0x60292618:  addi       r9,r20,-4
> 0x6029261c:  stwbrx     r24,r0,r9
> 0x60292620:  mr r20,r9
> 0x60292624:  lis        r9,12299
> 0x60292628:  addi       r9,r9,-26136
> 0x6029262c:  stw        r9,32(r27)
> 0x60292630:  blr
> 
> Failing (current CVS):
> AFTER FLAGS OPT:
> 0x0000: movl_T0_ESP
> 0x0001: pushl_T0
> 0x0002: movl_T0_im 0x300a9996
> 0x0003: pushl_T0
> 0x0004: jmp_tb_next 0x601958f0 0x300a99e8
> 0x0005: end
> 
> OUT: [size=64]
> 0x603358f0:  mr r24,r20
> 0x603358f4:  addi       r9,r20,-4
> 0x603358f8:  stwbrx     r24,r0,r9
> 0x603358fc:  mr r20,r9
> 0x60335900:  lis        r9,12299
> 0x60335904:  addi       r24,r9,-26218
> 0x60335908:  addi       r9,r20,-4
> 0x6033590c:  stwbrx     r24,r0,r9
> 0x60335910:  mr r20,r9
> 0x60335914:  b  6045EEDC        <<< strange?
> 0x60335918:  lis        r11,24601
> 0x6033591c:  lis        r9,12299
> 0x60335920:  addi       r24,r11,22768
> 0x60335924:  addi       r9,r9,-26136
> 0x60335928:  stw        r9,32(r27)
> 0x6033592c:  blr
> 
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel
> 
> 


-- 
Fabrice.

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-07-29 20:57 ` Fabrice Bellard
@ 2003-07-29 21:33   ` Jocelyn Mayer
  2003-07-30 14:27     ` Jocelyn Mayer
  0 siblings, 1 reply; 7+ messages in thread
From: Jocelyn Mayer @ 2003-07-29 21:33 UTC (permalink / raw)
  To: qemu mailing list

On Tue, 2003-07-29 at 22:57, Fabrice Bellard wrote:
> The problem is that I don't have access to a gcc-3.3 powerpc based system...
> 
> Fabrice.
> 
<...snip...>

I got one with gcc 3.2.
I'll make some tries when I have an up-to-date qemu-x86 repository.
With the version I have today (about one week aged CVS co),
I have no probleme.
The kernel is 2.4.21-rc7, I must also check the glibc version.
I compiled today an up-to-date CVS qemu for PPC target,
so syscall.c did compile, with a 2.6.0-test1 kernel.

I may also try to update my compiler to gcc-3.3, if I'm not too lazy :=)

-- 
Jocelyn Mayer <l_indien@magic.fr>

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-07-29 21:33   ` Jocelyn Mayer
@ 2003-07-30 14:27     ` Jocelyn Mayer
  2003-08-05 11:18       ` Christof Petig
  0 siblings, 1 reply; 7+ messages in thread
From: Jocelyn Mayer @ 2003-07-30 14:27 UTC (permalink / raw)
  To: qemu mailing list

On Tue, 2003-07-29 at 23:33, Jocelyn Mayer wrote:
> On Tue, 2003-07-29 at 22:57, Fabrice Bellard wrote:
> > The problem is that I don't have access to a gcc-3.3 powerpc based system...
> > 
> > Fabrice.
> > 
> <...snip...>
> 
> I got one with gcc 3.2.
> I'll make some tries when I have an up-to-date qemu-x86 repository.
> With the version I have today (about one week aged CVS co),
> I have no probleme.
> The kernel is 2.4.21-rc7, I must also check the glibc version.
> I compiled today an up-to-date CVS qemu for PPC target,
> so syscall.c did compile, with a 2.6.0-test1 kernel.
> 
> I may also try to update my compiler to gcc-3.3, if I'm not too lazy :=)

I compiled a fresh gcc 3.3 tonight.
I've been able to build all qemu emulator targets,
after a cvs update with no problems.
My config is now:
kernel 2.6.0-test1
glibc 2.2.5
gcc 3.3
binutils 1.13

I also compiled on a PC at the same time.
The only problem I had was the compilation of signal.c in debug mode
on the PC (kernel 2.4.21-pre7, glibc 2.2.5,gcc 2.95.3, binutils 2.13)
I had to use this patch:

Index: signal.c
===================================================================
RCS file: /cvsroot/qemu/qemu/signal.c,v
retrieving revision 1.17
diff -u -d -w -B -b -d -p -r1.17 signal.c
--- signal.c    13 Jul 2003 17:33:54 -0000      1.17
+++ signal.c    30 Jul 2003 14:22:13 -0000
@@ -378,16 +378,16 @@ static void dump_regs(struct ucontext *u
             "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
             "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
             "EFL=%08x EIP=%08x\n",
-            uc->uc_mcontext.gregs[EAX],
-            uc->uc_mcontext.gregs[EBX],
-            uc->uc_mcontext.gregs[ECX],
-            uc->uc_mcontext.gregs[EDX],
-            uc->uc_mcontext.gregs[ESI],
-            uc->uc_mcontext.gregs[EDI],
-            uc->uc_mcontext.gregs[EBP],
-            uc->uc_mcontext.gregs[ESP],
-            uc->uc_mcontext.gregs[EFL],
-            uc->uc_mcontext.gregs[EIP]);
+            uc->uc_mcontext.gregs[REG_EAX],
+            uc->uc_mcontext.gregs[REG_EBX],
+            uc->uc_mcontext.gregs[REG_ECX],
+            uc->uc_mcontext.gregs[REG_EDX],
+            uc->uc_mcontext.gregs[REG_ESI],
+            uc->uc_mcontext.gregs[REG_EDI],
+            uc->uc_mcontext.gregs[REG_EBP],
+            uc->uc_mcontext.gregs[REG_ESP],
+            uc->uc_mcontext.gregs[REG_EFL],
+            uc->uc_mcontext.gregs[REG_EIP]);
 }
 #else
 static void dump_regs(struct ucontext *uc)

Regards.

-- 
Jocelyn Mayer <l_indien@magic.fr>

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-07-30 14:27     ` Jocelyn Mayer
@ 2003-08-05 11:18       ` Christof Petig
  2003-08-05 12:26         ` Herbert Pötzl
  2003-08-05 13:40         ` Jocelyn Mayer
  0 siblings, 2 replies; 7+ messages in thread
From: Christof Petig @ 2003-08-05 11:18 UTC (permalink / raw)
  To: qemu-devel

Jocelyn Mayer schrieb:
> I compiled a fresh gcc 3.3 tonight.
> I've been able to build all qemu emulator targets,
> after a cvs update with no problems.
> My config is now:
> kernel 2.6.0-test1
> glibc 2.2.5
> gcc 3.3
> binutils 1.13

My problem is not that it does not compile with 3.3 (it actually 
compiles well). If compiled with 3.3 it goes into an endless loop (or 
ill-instructs with -O1). And I can't go back to 2.95 because 2.95 does 
not like the new debian kernel headers.

Anyway the fact that different kernel headers (2.4.21-powerpc) are 
shipped with glibc on debian and used during the compilation might be 
the problem for me.

Perhaps I would have had more luck if I either took my 2.4.21 headers or 
the 2.6.0-test2 headers. I will give it a try (but 2.6.0-test2 does not 
compile for me [problem with event.c])

gcc-3.3        3.3.1-0rc2
binutils       2.14.90.0.5-0.2
libc6-dev      2.3.1-17.0.2 (which ships some kernel headers)
running kernel is  2.4.21-ben2

So my hope was that somebody experienced with ppc on this list might 
spot that the generated assembler code (see my previous mail) was plain 
wrong (or wrongly cut out).
    Christof

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-08-05 11:18       ` Christof Petig
@ 2003-08-05 12:26         ` Herbert Pötzl
  2003-08-05 13:40         ` Jocelyn Mayer
  1 sibling, 0 replies; 7+ messages in thread
From: Herbert Pötzl @ 2003-08-05 12:26 UTC (permalink / raw)
  To: Christof Petig; +Cc: qemu-devel

On Tue, Aug 05, 2003 at 01:18:44PM +0200, Christof Petig wrote:
> Jocelyn Mayer schrieb:
> >I compiled a fresh gcc 3.3 tonight.
> >I've been able to build all qemu emulator targets,
> >after a cvs update with no problems.
> >My config is now:
> >kernel 2.6.0-test1
> >glibc 2.2.5
> >gcc 3.3
> >binutils 1.13
> 
> My problem is not that it does not compile with 3.3 (it actually 
> compiles well). If compiled with 3.3 it goes into an endless loop (or 
> ill-instructs with -O1). And I can't go back to 2.95 because 2.95 does 
> not like the new debian kernel headers.

hmm, so debian uses gcc 3.3.1 ? doesn't sound like
anything stable at all ... unusual 

> Anyway the fact that different kernel headers (2.4.21-powerpc) are 
> shipped with glibc on debian and used during the compilation might be 
> the problem for me.
> 
> Perhaps I would have had more luck if I either took my 2.4.21 headers or 
> the 2.6.0-test2 headers. I will give it a try (but 2.6.0-test2 does not 
> compile for me [problem with event.c])

IMHO, glibc should providei/use the 'correct' headers
(the ones glibc was compiled for/with) and the kernel
should use its own ... probably gcc itself does something
unexpected ...

HTH,
Herbert

> gcc-3.3        3.3.1-0rc2
> binutils       2.14.90.0.5-0.2
> libc6-dev      2.3.1-17.0.2 (which ships some kernel headers)
> running kernel is  2.4.21-ben2
> 
> So my hope was that somebody experienced with ppc on this list might 
> spot that the generated assembler code (see my previous mail) was plain 
> wrong (or wrongly cut out).
>    Christof
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel

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

* Re: [Qemu-devel] powerpc (debian/sid) woes
  2003-08-05 11:18       ` Christof Petig
  2003-08-05 12:26         ` Herbert Pötzl
@ 2003-08-05 13:40         ` Jocelyn Mayer
  1 sibling, 0 replies; 7+ messages in thread
From: Jocelyn Mayer @ 2003-08-05 13:40 UTC (permalink / raw)
  To: qemu mailing list

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

On Tue, 2003-08-05 at 13:18, Christof Petig wrote:
> Jocelyn Mayer schrieb:
> > I compiled a fresh gcc 3.3 tonight.
> > I've been able to build all qemu emulator targets,
> > after a cvs update with no problems.
> > My config is now:
> > kernel 2.6.0-test1
> > glibc 2.2.5
> > gcc 3.3
> > binutils 1.13
> 
> My problem is not that it does not compile with 3.3 (it actually 
> compiles well). If compiled with 3.3 it goes into an endless loop (or 
> ill-instructs with -O1). And I can't go back to 2.95 because 2.95 does 
> not like the new debian kernel headers.
> 
I need to do more tests to check if this ever happens for me...

> Anyway the fact that different kernel headers (2.4.21-powerpc) are 
> shipped with glibc on debian and used during the compilation might be 
> the problem for me.
> 
> Perhaps I would have had more luck if I either took my 2.4.21 headers or 
> the 2.6.0-test2 headers. I will give it a try (but 2.6.0-test2 does not 
> compile for me [problem with event.c])
Here's the patch you need to make it compile:



[-- Attachment #2: evdev.c.diff --]
[-- Type: text/plain, Size: 735 bytes --]

--- evdev.c.old	Mon Jun 16 06:39:02 2003
+++ evdev.c	Thu Jul 31 02:41:35 2003
@@ -208,7 +208,7 @@
 	struct evdev *evdev = list->evdev;
 	struct input_dev *dev = evdev->handle.dev;
 	struct input_absinfo abs;
-	int i, t, u;
+	int i, t, u, v;
 
 	if (!evdev->exist) return -ENODEV;
 
@@ -240,7 +240,8 @@
 			if (get_user(t, ((int *) arg) + 0)) return -EFAULT;
 			if (t < 0 || t > dev->keycodemax || !dev->keycodesize) return -EINVAL;
 			u = INPUT_KEYCODE(dev, t);
-			if (get_user(INPUT_KEYCODE(dev, t), ((int *) arg) + 1)) return -EFAULT;
+                        v = INPUT_KEYCODE(dev, t);
+			if (get_user(v, ((int *) arg) + 1)) return -EFAULT;
 
 			for (i = 0; i < dev->keycodemax; i++)
 				if(INPUT_KEYCODE(dev, t) == u) break;

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

end of thread, other threads:[~2003-08-05 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-28 20:09 [Qemu-devel] powerpc (debian/sid) woes Christof Petig
2003-07-29 20:57 ` Fabrice Bellard
2003-07-29 21:33   ` Jocelyn Mayer
2003-07-30 14:27     ` Jocelyn Mayer
2003-08-05 11:18       ` Christof Petig
2003-08-05 12:26         ` Herbert Pötzl
2003-08-05 13:40         ` Jocelyn Mayer

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