Re: C code .vs. Assembly code for Microcontrollers/DSPs ?

pdonovan@netcom.com (Peter Donovan)
21 Mar 1996 23:46:41 -0500

          From comp.compilers

Related articles
[32 earlier articles]
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? preston@cs.rice.edu (1996-03-17)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? elvey@hal.com (1996-03-17)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? john.gilliver@gecm.com (1996-03-20)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? leichter@smarts.com (Jerry Leichter) (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? stefan.monnier@lia.di.epfl.ch (Stefan Monnier) (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? pdonovan@netcom.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? fjh@cs.mu.OZ.AU (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cliffc@ami.sps.mot.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? schwarz@mips.complang.tuwien.ac.at (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? jfc@mit.edu (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? chuck@aage.mit.edu (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? preston@tera.com (1996-03-22)
[11 later articles]
| List of all articles for this month |
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.


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.