Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!world!esegue!compilers-sender From: avi@taux01.nsc.com (Avi Bloch) Newsgroups: comp.compilers Subject: Re: Compiling for DSP chips Keywords: C, optimize Message-ID: <4751@taux01.nsc.com> Date: 24 Sep 90 12:03:55 GMT References: <9009071606.AA22759@m2.csc.ti.com> <1990Sep11.075042.937@funet.fi> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: avi@taux01.nsc.com (Avi Bloch) Organization: National Semiconductor (IC) Ltd, Israel Lines: 36 Approved: compilers@esegue.segue.boston.ma.us I realize that I'm a little late on this topic but I just saw the tail end of this discussion and I thought I'd add what National Semiconductor has to offer in this field. National Semiconductor recently announced three micro-processors: the ns32fx16, ns32cg160 and the ns32gx320. All of these processors have a core of a general purpose processor with additions for DSP and fax applications. These additions are accessed using either special instructions or memory-mapped i/o. In order to allow the user to access these special instructions from HLL (in our case - C) we invented a mechanism which we call Application Specific Instruction Set (ASIS) Support. What this entails is a group of functions and procedures whose prototypes are supplied in an 'include' file and are recognized by the compiler. These functions are then inlined by the compiler. The compiler (including the optimizer) has intimate knowledge on how these instructions work, e.g., which parameters are changed by the instruction or in which register each parameter much reside, and it uses this knowledge to allocate registers and generate code in a most efficient manner. I'm not saying that it will be as good as if it was written in assembly but in most cases it's good enough. I'm willing to add more details for anyone interested. BTW, if anyone knows of any other compiler that does something similar, I'd be interested to hear about it. -- Avi Bloch National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel: (972) 52-522263 avi@taux01.nsc.com [GCC lets you in-line assembler, frequently hidden inside macros, that is often used to get to features like sin and cos instructions. -John] -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.