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

elvey@hal.com (Dwight Elvey)
17 Mar 1996 23:24:48 -0500

          From comp.compilers

Related articles
[27 earlier articles]
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-15)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-16)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? dan@watson.ibm.com (1996-03-16)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? stefan.monnier@lia.di.epfl.ch (Stefan Monnier) (1996-03-16)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? albaugh@agames.com (1996-03-16)
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)
[18 later articles]
| List of all articles for this month |
From: elvey@hal.com (Dwight Elvey)
Newsgroups: comp.arch,comp.compilers,comp.dsp
Date: 17 Mar 1996 23:24:48 -0500
Organization: HAL Computer Systems, Inc.
References: 96-03-006 96-03-091
Keywords: C, performance

ravindra@hal.com says...
>I've heard people say so many times, that hand-crafted (assembly) code
>is more compact than compiled C code for microcontrollers or DSPs.
>
>So where is the problem?


sberg@camtronics.com (Scott A. Berg) writes:
|> I have been writing embedded hard real time system software for about
|> 10 years, and I believe the claim that, when speed is paramount, a
|> good assembly programmer does better than a good compiler. I believe
|> this is due to several things.


....... much deleted .........


One other is related to the programmer not fully understanding the
particular processor. That other thing is indexing and arrays. It is
almost impossible for the compiler to understand how best to implement
these without the programmer having specific knowlwdge of the
particular processor. If one has the knowledge, they may as well have
used assembler anyway. Once one works with several high level
languages, they often can go back to assembers and do a vary good
job. Since they tend to do better code structure, the code can also be
more easily ported to other processors. Of course if you're
application is not speed limited, you can always write it to run under
windows on a pc with any of the commond compilers.


  The best option is to do a mixture of high level and assembly
code. This gets the best of both worlds. Any C compiler for DSP that
doesn't allow inline assembly is so much waist. Dwight
--


Post a followup to this message

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