Re: Optimizing in assembly language

Shankar Unni <sunni@speakeasy.net>
26 Mar 2001 13:52:21 -0500

          From comp.compilers

Related articles
[12 earlier articles]
Re: Optimizing in assembly language bonzini@gnu.org (2001-03-22)
Re: Optimizing in assembly language thp@hill.cs.ucr.edu (Tom Payne) (2001-03-22)
Re: Optimizing in assembly language Eric.Boon@ICT.nl (Eric Boon) (2001-03-22)
Re: Optimizing in assembly language uabbwat@uab.ericsson.se (Barry Watson) (2001-03-26)
Re: Optimizing in assembly language Martin.Ward@durham.ac.uk (2001-03-26)
Re: Optimizing in assembly language joachim_d@gmx.de (Joachim Durchholz) (2001-03-26)
Re: Optimizing in assembly language sunni@speakeasy.net (Shankar Unni) (2001-03-26)
Re: Optimizing in assembly language rhyde@transdimension.com (Randall Hyde) (2001-03-27)
C as assembly language joachim_d@gmx.de (Joachim Durchholz) (2001-04-04)
Re: C as assembly language eodell@c1220335-a.potlnd1.or.home.com (2001-04-10)
Re: C as assembly language andi@complang.tuwien.ac.at (2001-04-10)
Re: C as assembly language jmorris2@twcny.rr.com (Morrisett) (2001-04-10)
Re: C as assembly language jacob@jacob.remcomp.fr (jacob navia) (2001-04-10)
[8 later articles]
| List of all articles for this month |

From: Shankar Unni <sunni@speakeasy.net>
Newsgroups: comp.compilers
Date: 26 Mar 2001 13:52:21 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 01-03-006 01-03-046
Keywords: optimize, assembler
Posted-Date: 26 Mar 2001 13:52:21 EST

I wrote:


> It's not such a wild-assed thought.


And our esteemed moderator added:


> [Quite a while ago I read a paper about a Bell Labs language called LIL
> that was intended as a level between C and assembler. They eventually
> declared it a failure because in every case where they thought it would
> be useful, it turned out to be easier overall to make their C compiler
> emit better code and write in C. -John]


Absolutely. No argument in 99% of the cases.


The only place where it makes sense to do this is if you have to write
snippets of code that either does not fit into a standard C model
(usually interleaving assembly inside regular C code), or touches
registers or other resources that fall outside the usual "registers and
memory" model, *AND* and you want to be able to do at least some
instruction rearranging around or even through the assembly code.


This becomes even more important if, for the convenience of your
programmers, you provide macros that do standard things in a convenient
fashion (e.g. DSP blocks), and you don't want to go around adding
high-level built-ins for each of those building blocks..


--
Shankar Unni sunni@speakeasy.net


Post a followup to this message

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