From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Evans To: joel@OARcorp.com Cc: gas2@cygnus.com Subject: Re: other apps that assemble code Date: Thu, 05 Feb 1998 11:09:00 -0000 Message-id: <199802051907.LAA28343@canuck.cygnus.com.> References: X-SW-Source: 1998/msg00034.html Date: Thu, 5 Feb 1998 12:49:11 -0600 (CST) From: Joel Sherrill > Date: Thu, 5 Feb 1998 11:47:36 -0600 (CST) > From: Joel Sherrill > > 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. > > Ok, but methinks this is still just GAS. > Or am I misunderstanding something? I guess it could be but would it be cleaner to have it as a separate tool which manipulated source. Technically either approach is viable. >From an implementation standpoint, having a separate tool might make that tool easier to update/port. From a strict viewpoint, gas shoud only take assembler and generate object. That is a difficult enough process as it is. Having to deal with possible code reordering, nops could only make gas more complex and difficult to maintain. I don't know much about gas internals. Does it have an internal representation which could be manipulated like this? Nope (or rather, yep for some particular ports for some limited forms of optimization).