Re: [Qemu-devel] [patch] gcc4 host support

2005-05-20 Thread Paul Brook
On Thursday 19 May 2005 23:25, John Hogerhuis wrote: > But once you are past that point gcc for a given arch, gcc isn't > really going to help you any more. So bring on the hand > coding/optimizations. There's no doubt the hand coded stuff would be > at least as good as gcc output. And that's becau

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-20 Thread Thomas Steffen
On 5/20/05, John Hogerhuis <[EMAIL PROTECTED]> wrote: > But once you are past that point gcc for a given arch, gcc isn't > really going to help you any more. So bring on the hand > coding/optimizations. And for popular combinations of architectures, such as x86 or PPC on each other, I absolute a

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread John Hogerhuis
On 5/19/05, Thomas Steffen <[EMAIL PROTECTED]> wrote: > It as also because C avoids the n by m problem. > My point is that you can have your cake and eat it too. For any given architecture gcc can generate the first approximation by way of dyngen or dyngen + gcc enhancements. But once you are

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Thomas Steffen
On 5/19/05, Paul Brook <[EMAIL PROTECTED]> wrote: > No. The problem is to turn machine code into (a different form of) machine > code. A lot of the complexity in a compiler is involved with with turning the > high-level language constructs into simple low-level machine operations. I see your point

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Paul Brook
On Thursday 19 May 2005 20:38, Tim Walker wrote: > Pardon me for butting in, is any of the host encoding hand written? There is some x86 assembly for the tlb lookup, but everything else is written in C. Paul ___ Qemu-devel mailing list Qemu-devel@non

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Tim Walker
Paul Brook wrote: On Thursday 19 May 2005 19:14, Thomas Steffen wrote: On 5/19/05, Paul Brook <[EMAIL PROTECTED]> wrote: I don't think GNU lightning really gains us much. We'd still have to do the hard bits (optimization, register allocation, assigning stack slots,

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Paul Brook
On Thursday 19 May 2005 19:14, Thomas Steffen wrote: > On 5/19/05, Paul Brook <[EMAIL PROTECTED]> wrote: > > I don't think GNU lightning really gains us much. We'd still have to do > > the hard bits (optimization, register allocation, assigning stack slots, > > etc). The actual native code generati

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Thomas Steffen
On 5/19/05, Paul Brook <[EMAIL PROTECTED]> wrote: > I don't think GNU lightning really gains us much. We'd still have to do the > hard bits (optimization, register allocation, assigning stack slots, etc). > The actual native code generation (which is what lightning gives you) is only > a few hundr

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Ian Rogers
You may also want to look at Dawson Engler's VCODE. Like GNU Lightning it's not been touched in a while. Ian Gwenole Beauchesne wrote: On Thu, 19 May 2005, Paul Brook wrote: Do you have a URL? Neither google nor freshmeat.net turn up anything useful. Sorry, here it is:

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Paul Brook
On Thursday 19 May 2005 15:07, Gwenole Beauchesne wrote: > On Thu, 19 May 2005, Paul Brook wrote: > > Do you have a URL? Neither google nor freshmeat.net turn up anything > > useful. > > Sorry, here it is: > (used for valgrind 3.0) >

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread McMullan, Jason
On Thu, 2005-05-19 at 09:23 +0200, Gwenole Beauchesne wrote: > Have you considered the VEX library? I have not tried it yet but it > looks promising. However, since it aims at providing a common IR, it > can miss certain optimizations related to condition codes (at least as > ppc guest). 'VEX'

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Gwenole Beauchesne
On Thu, 19 May 2005, Paul Brook wrote: > Do you have a URL? Neither google nor freshmeat.net turn up anything useful. Sorry, here it is: (used for valgrind 3.0) > It would be nice if we could use some sort of porta

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Paul Brook
On Thursday 19 May 2005 08:23, Gwenole Beauchesne wrote: > Le mercredi, 18 mai 2005, à 22:48 Europe/Paris, Paul Brook a écrit : > > It's been said before that the long-term solution is to > > [incrementally] remove > > dyngen altogether, and replace it with a had-written code generator. > > I've di

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-19 Thread Gwenole Beauchesne
Le mercredi, 18 mai 2005, à 22:48 Europe/Paris, Paul Brook a écrit : It's been said before that the long-term solution is to [incrementally] remove dyngen altogether, and replace it with a had-written code generator. I've discussed this in a bit more detail with Fabrice, and have an almost-working

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Ian Rogers
Paul Brook wrote: I know I'd seen something like this before, thanks for reminding me. There are several issues with PearColator/RVM: - It's written in java. qemu is written in C, so a lot of porting would be required to get anything working. - The best benchmark results are half the speed of qemu

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Ian Rogers
[EMAIL PROTECTED] wrote: I am definetly out of my depth here, but... Speaking of GCJ's JIT... Sometime back, Ian Rogers here brought up the PearColator project at: http://www.binarytranslator.org/ We're still here and hacking. PearColator and QEMU are quite different projects and we rely on th

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Paul Brook
> I am definetly out of my depth here, but... Speaking of GCJ's JIT... > > Sometime back, Ian Rogers here brought up the PearColator project at: > http://www.binarytranslator.org/ > > *** > I have been working on an open source Java based PowerPC emulator based > around a JVM's optimising compiler.

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread jeebs
From: "David Woodhouse" > On Wed, 2005-05-18 at 21:48 +0100, Paul Brook wrote: >> It's been said before that the long-term solution is to >> [incrementally] remove dyngen altogether, and replace it with a >> had-written code generator. I've discussed this in a bit more detail > > How feasible woul

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Paul Brook
On Wednesday 18 May 2005 21:55, David Woodhouse wrote: > On Wed, 2005-05-18 at 21:48 +0100, Paul Brook wrote: > > It's been said before that the long-term solution is to > > [incrementally] remove dyngen altogether, and replace it with a > > had-written code generator. I've discussed this in a bit

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread David Woodhouse
On Wed, 2005-05-18 at 21:48 +0100, Paul Brook wrote: > It's been said before that the long-term solution is to > [incrementally] remove dyngen altogether, and replace it with a > had-written code generator. I've discussed this in a bit more detail > with Fabrice, and have an almost-working prototyp

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Paul Brook
On Wednesday 18 May 2005 20:29, John Hogerhuis wrote: > This all feels wrong in general. The changes should either be adding > some facility to gcc which permits QEMU to use it in this way (gcc is > an open source project after all, so it's at least a possibility), Are you willing to write and ma

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread John Hogerhuis
This all feels wrong in general. The changes should either be adding some facility to gcc which permits QEMU to use it in this way (gcc is an open source project after all, so it's at least a possibility), or we should generate the dynamic code generator once with whatever version of GCC and make t

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Paul Brook
On Wednesday 18 May 2005 11:06, Herbert Poetzl wrote: > On Tue, May 17, 2005 at 09:46:30PM +0100, Paul Brook wrote: > > On Monday 16 May 2005 10:41, David Woodhouse wrote: > > > On Wed, 2005-05-11 at 22:04 +0100, Paul Brook wrote: > > > > My solution is to search the function for the "ret" instruct

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread David Woodhouse
On Wed, 2005-05-18 at 17:02 +0100, Paul Brook wrote: > For x86 maybe. For ppc it's easier to just scan the binary code. > You'd have to write an assembly code parser. It wouldn't have to know much. I suspect you could do it in awk without much trouble. -- dwmw2 ___

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Herbert Poetzl
On Tue, May 17, 2005 at 09:46:30PM +0100, Paul Brook wrote: > On Monday 16 May 2005 10:41, David Woodhouse wrote: > > On Wed, 2005-05-11 at 22:04 +0100, Paul Brook wrote: > > > My solution is to search the function for the "ret" instruction and > > > replace them with a jmp to the next block of cod

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-18 Thread Paul Brook
On Monday 16 May 2005 10:41, David Woodhouse wrote: > On Wed, 2005-05-11 at 22:04 +0100, Paul Brook wrote: > > My solution is to search the function for the "ret" instruction and > > replace them with a jmp to the next block of code. On RISC targets this > > would be easy. > > About this easy, in f

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-17 Thread David Woodhouse
On Wed, 2005-05-11 at 22:04 +0100, Paul Brook wrote: > My solution is to search the function for the "ret" instruction and replace > them with a jmp to the next block of code. On RISC targets this would be > easy. About this easy, in fact... --- qemu/dyngen.c.x 2005-05-16 10:30:43.

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-14 Thread Filip Navara
Paul Brook wrote: In addition to this patch I also needed the attached patch to get MinGW GCC 3.4.1 builds working... ... -if (strstart(sym_name, "__op_label", &p)) { +if (strstart(sym_name, "__op_label", &p) || +strstart(sym_name, "_op_label", &p

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-14 Thread Paul Brook
> In addition to this patch I also needed the attached patch to get MinGW > GCC 3.4.1 builds working... > >... > -                if (strstart(sym_name, "__op_label", &p)) { > +                if (strstart(sym_name, "__op_label", &p) || > +strstart(sym_name, "_op_label", &p)) {

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-14 Thread Filip Navara
Paul Brook wrote: On Wednesday 11 May 2005 22:04, Paul Brook wrote: The attached patch adds support for gcc4 x86 and x86_64 hosts. This time with the correct patch attached. Paul In addition to this patch I also needed the attached patch to get MinGW GCC 3.4.1 builds working... - Filip

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-12 Thread Paul Brook
On Thursday 12 May 2005 23:13, Pascal Terjan wrote: > On 5/12/05, Paul Brook <[EMAIL PROTECTED]> wrote: > > On Wednesday 11 May 2005 22:04, Paul Brook wrote: > > > The attached patch adds support for gcc4 x86 and x86_64 hosts. > > > > This time with the correct patch attached. > > Hello, I can't bu

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-12 Thread Pascal Terjan
On 5/12/05, Paul Brook <[EMAIL PROTECTED]> wrote: > On Wednesday 11 May 2005 22:04, Paul Brook wrote: > > The attached patch adds support for gcc4 x86 and x86_64 hosts. > > This time with the correct patch attached. Hello, I can't build qemu under gcc4.0.0 with your patch and using -O2. I get : /

Re: [Qemu-devel] [patch] gcc4 host support

2005-05-12 Thread Paul Brook
On Wednesday 11 May 2005 22:04, Paul Brook wrote: > The attached patch adds support for gcc4 x86 and x86_64 hosts. This time with the correct patch attached. Paul Index: dyngen-exec.h === RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v

[Qemu-devel] [patch] gcc4 host support

2005-05-11 Thread Paul Brook
The attached patch adds support for gcc4 x86 and x86_64 hosts. The main problem with gcc4 is that we can no longer force gcc to place the return from each function at the end of the function. My solution is to search the function for the "ret" instruction and replace them with a jmp to the next