From: | David Chase <chase@world.std.com> |
Newsgroups: | comp.compilers |
Date: | 16 May 1997 23:38:07 -0400 |
Organization: | Compilers Central |
References: | 97-05-183 |
Keywords: | C, assembler |
Ray Dillinger wrote:
> I've been looking for a good target language for compilation;
> And, I think a lobotomized subset of C does what I want. I can write
> this kind of pseudo-machine code in C, with a honking huge main()
> routine, global variables for the registers, etc.
> However, this will violate every "reasonable" assumption a maker of C
> compiers will have about programming style.
> Will modern C systems handle this?
> [Probably not. Machine generated source code always seems to break
> compilers designed for code written by humans. -John]
I'd say, give it a try, but bend over backwards to generate
Ansi-compliant C, then you can try to get the largest and most ugly of
the codes your "compiler" generates incorporated into an
"industry-standard benchmark". I'm not quite so pessimistic as our
Esteemed Moderator; I think that some compilers will accept it, some
will not, and there is great fun to be had if you can point out the
less-capable compiler vendors. C is also not the greatest assembly
language in the world, though convergence to the Ansi standard has
improved things very much since 1990 (when I wrote a Modula3- to-C
code generator).
One experiment you might try, before you commit huge amounts of
intellectual effort to this, is to write a simple huge-program-
generator, and try it out with a few different compilers.
David
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.