From: | pdonovan@netcom.com (Peter Donovan) |
Newsgroups: | comp.arch,comp.compilers |
Date: | 21 Mar 1996 23:46:41 -0500 |
Organization: | NETCOM On-line Communication Services (408 261-4700 guest) |
References: | 96-03-006 96-03-091 96-03-110 |
Keywords: | optimize, architecture |
The arguments for and against assembly programming are all well and good.
Each side has some merit.
For example, it's pretty silly to spend N man-months of effort to
support (in a compiler) a very uncommon special case that would take
an assembly programmer several minutes to do. (-Though I've seen such
nonsense proposed more than once, usually in the name of the great god
marketing.)
On the other hand some DSP type instructions are just not easily
automatically generable and would yield impressive speed up if they
could be used.
Consider an operation like, "add4bytes r1,r2 ->dest"
whose semantics are, well, add 4 byte sized quantities, which must
all be correctly bit positioned in r1 and r2, and place the (4)
results in dest.
Now, ignoring language constraints,
you might want to generate this from source that looks like:
char a[20], b[20], c[20];
int i;
for ( i = ... )
{
a[i] = b[i] + c[i];
a[i+1] = b[i+1] + c[i+1];
a[i+2] = b[i+2] + c[i+2];
...
etc.
}
I've seen some papers (Steve Tjiang et. al.) that seem to offer an
approach to the above, but really nothing definitive.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.