|Optimizing in assembly language email@example.com (Randall Hyde) (2001-03-01)|
|Re: Optimizing in assembly language firstname.lastname@example.org (Jim Granville) (2001-03-04)|
|Re: Optimizing in assembly language email@example.com (Shankar Unni) (2001-03-04)|
|Re: Optimizing in assembly language firstname.lastname@example.org (T.Shackell) (2001-03-08)|
|Re: Optimizing in assembly language email@example.com (Jonathan Guthrie) (2001-03-08)|
|Re: Optimizing in assembly language firstname.lastname@example.org (Laurent Desnogues) (2001-03-08)|
|Re: Optimizing in assembly language email@example.com (Tzvetan Mikov) (2001-03-08)|
|Re: Optimizing in assembly language firstname.lastname@example.org (A Johnstone) (2001-03-08)|
|Re: Optimizing in assembly language email@example.com (Randall Hyde) (2001-03-10)|
|[24 later articles]|
|From:||Shankar Unni <firstname.lastname@example.org>|
|Date:||4 Mar 2001 01:54:32 -0500|
|Organization:||Posted via Supernews, http://www.supernews.com|
|Posted-Date:||04 Mar 2001 01:54:32 EST|
Randall Hyde wrote:
> So here's my question: why can't we write an "optimizing assembler"
> that lets the programmer specify machine sequences and the assembler
> does the same kinds of "book keeping" that a HLL compiler would do.
It's not such a wild-assed thought.
The key would be to wrap the assembler instructions in some high-level
construct that allowed you to match up the input and output memory
operands to concrete symbolic memory locations (stack or heap or
global variables), so that you could intermix assembly and C (HLL)
code, and have the two be optimized together.
GCC has some sort of a notation like this, except that they don't
actually touch the assembly sections, but merely uses those notations
to decide what side-effects a snippet of assembly code has. But it's
not all that hard to extend the model to also go in and try to fiddle
with the instructions themselves..
I also know of several attempts at "optimizing assemblers" (IIRC, the
HP-PA assembler used to have an "optimization" flag that attempted to
do do some basic instruction rearranging to achieve reasonable
pipelining and reduce stalls..
Also, the MIPS assembler tried (for the R3000) to ensure that you
didn't have any hazards (e.g. register write-read) in the code
(because the architecture didn't have any such protections).
Shankar Unni email@example.com
[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]
Return to the
Search the comp.compilers archives again.