From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Sherrill To: Doug Evans Cc: gas2@cygnus.com Subject: Re: other apps that assemble code Date: Thu, 05 Feb 1998 09:47:00 -0000 Message-id: References: <199802051735.JAA28194@canuck.cygnus.com.> X-SW-Source: 1998/msg00028.html On Thu, 5 Feb 1998, Doug Evans wrote: > Date: Thu, 5 Feb 1998 11:26:18 -0600 (CST) > From: Joel Sherrill > > 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