This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: other apps that assemble code




On Thu, 5 Feb 1998, Doug Evans wrote:

>    Date: Thu, 5 Feb 1998 11:26:18 -0600 (CST)
>    From: Joel Sherrill <joel@OARcorp.com>
> 
>    Also people do write assembly language so not all input is compiler
>    generated. I know this almost qualifies as a smart mouthed suggestion. :)
> 
> When they do this, is the code ever fed through anything other than
> an assembler that takes in assembly files and spits out object files?
> 
> The reason I'm asking is that I have an assembly language parser
> for some chips and am wondering whether it has any use outside of GAS.

I have seen articles about "optimizing assemblers" for really smart cpus
which insert nops, reorder instructions to avoid stalls, reassign
registers, etc.   This type of tools would benefit from a generic assembly
language parser.

Another possible use is an assembly translator which takes code for one
cpu and attempts to convert it to another assembly language.  I know this
sounds scary but on some of the early RTEMS ports (RTEMS was ~20% assembly
then), I used some sed and awk scripts to convert Motorola assembly to
Intel i386 and i960 assembly as a starting point.  A smart tool could save
you a lot of bloody fingers here.

I suspect that Hunter Ready Systems (remember the original VRTX) had an
inhouse product like this since they claimed the entire kernel was in
assembly.  I never could figure out how that would be practical to maintin
unless it was written in a "pseudo-assembly" and converted.

Just some ideas.

--joel