After a lot of pound the code generator seems stable, and I can take a break to release romcc.
Currently it appears that any time it completes without error the code generated is correct.
And most importantly with a few minor tweaks it compiles the code written for l440gx memory initialization, before the compiler was written.
Currently ``constant propagation'', ineffectual code elimination (code that does not affect the output), a good register allocator and always inlining are the only optimizations implemented.
On the wishlist are: - using the mmx & sse registers on x86. - x86-64 and Itanium ports. - struct support - non string constant initializers. - A bibliography.
But it should be good enough to start playing with. The version gets to be 1.0 when the compiler is useful enough to compile a LinuxBIOS port.
ftp://ftp.lnxi.com/pub/src/linuxbios/romcc-0.21.tar.gz
Eric
Eric W. Biederman wrote:
After a lot of pound the code generator seems stable, and I can take a break to release romcc.
I gave it a quick test drive, looks pretty good. I want to put together a complete rom so I can actually execute it, but I have other things on the plate right now, will do so in a week or two I hope. Is the plan to re-code the assy that exists now, or only added code? If yes, then we should find a place to put the code, so all of us are not re-coding the same thing and wasting time.
Meanwhile, any immediate plans to add macros with arguments? Or can I use cpp somehow? Otherwise I will have to re-code my use of that or should I wait a week or two.
Also, I noticed it doesn't like functions with no args, "int func()" fails, wants "int func(void)". Very minor but thought I would mention.
Great work.
-Steve
On Tue, 8 Apr 2003, Steve Gehlbach wrote:
I gave it a quick test drive, looks pretty good. I want to put together a complete rom so I can actually execute it, but I have other things on the plate right now, will do so in a week or two I hope. Is the plan to re-code the assy that exists now, or only added code? If yes, then we should find a place to put the code, so all of us are not re-coding the same thing and wasting time.
I want to preserve the option of falling back to assy for those boards that have working assy. That way we can verify problems as they come up (and the will ...)
Also, I noticed it doesn't like functions with no args, "int func()" fails, wants "int func(void)". Very minor but thought I would mention.
This is good.
ron
"Ronald G. Minnich" rminnich@lanl.gov writes:
On Tue, 8 Apr 2003, Steve Gehlbach wrote:
I gave it a quick test drive, looks pretty good. I want to put together a complete rom so I can actually execute it, but I have other things on the plate right now, will do so in a week or two I hope. Is the plan to re-code the assy that exists now, or only added code? If yes, then we should find a place to put the code, so all of us are not re-coding the same thing and wasting time.
I want to preserve the option of falling back to assy for those boards that have working assy. That way we can verify problems as they come up (and the will ...)
For those that have not seen romcc. It outputs assembly. So basically it just creates another .inc file and the whole infrastructure does not need to change.
Also, I noticed it doesn't like functions with no args, "int func()" fails, wants "int func(void)". Very minor but thought I would mention.
This is good.
The weird thing romcc does is that it takes your very last defined function as your main function (no forward references allowed).
And that function it gets very upset if it is not void func(void); Because romcc considers it an error to use an uninitialized variable. It always fails though there are some cases where it is does not fail obviously.
Eric
Steve Gehlbach steve@nexpath.com writes:
Eric W. Biederman wrote:
After a lot of pound the code generator seems stable, and I can take a break to release romcc.
I gave it a quick test drive, looks pretty good. I want to put together a complete rom so I can actually execute it, but I have other things on the plate right now, will do so in a week or two I hope.
If you have a working etherboot setup you can load hello_world.elf with etherboot.
Is the plan to re-code the assy that exists now, or only added code? If yes, then we should find a place to put the code, so all of us are not re-coding the same thing and wasting time.
The plan is to open a development branch in the next couple of days and anything that survives on that branch should use it as much as possible.
Meanwhile, any immediate plans to add macros with arguments? Or can I use cpp somehow? Otherwise I will have to re-code my use of that or should I wait a week or two.
With inline functions being cheap it should not be a problem. You might need to specify -O but otherwise it should be ok. But I may have missed something.
Also, I noticed it doesn't like functions with no args, "int func()" fails, wants "int func(void)". Very minor but thought I would mention.
That is not a function with no args that is a function with a variable number of arguments. And functions with a variable argument count are not something I can see supporting.
Great work.
Thanks, Eric