Path: utzoo!utgpu!attcan!uunet!portal!cup.portal.com!bcase From: bcase@cup.portal.com (Brian bcase Case) Newsgroups: comp.arch Subject: Re: Binaries and Max Speed Message-ID: <13225@cup.portal.com> Date: 5 Jan 89 19:45:21 GMT References: <22745@apple> <2700003@prisma> <5847@polya.Stanford.EDU> <19240@shemp.CS.UCLA.EDU> <13114@cup.portal.com> <10596@gumby.mips.COM> Organization: The Portal System (TM) Lines: 38 >>I claim this isn't true. Getting rid of NOPs changes code addresses. >>You'll have to find all places where code addresses are referenced, >>including tables for case statements and other places where code >>addresses are computed at run time (procedure parameters?), and change >>them too. This is a hard problem. > >Hard problem? Not really, just you must be careful to modify all the >addresses correctly. Also, if your coding style (or the compilers) is >to intermix code and data in a hap-hazzard way or if you like to >write into the code area (:-{) these add significant difficulty. > >The Mips program pixie is used to add insturmentation to a program >for performance analysis. It must change the addresses to account >for the added code. Deleting code is much the same. Yes, I believe you probably can do it for MIPS code. The first thing that makes it possible is fixed-size and fixed-alignment instructions. These are attributes that make distinguishing code from data either trivial or unimportant (you can translate data as if it were code without harm, it would amount to a pessimistic assumption). Plus, it seems that PIXIE uses an address correspondence array (something that I thought *I* had thought of, sigh), which also helps (it keeps track of the mapping of old code addresses to new code addresses so that indirect branches will work OK). Thus, yes, I believe that you think this is not a hard problem for *your* environment. In general, however, which is how I took the original poster's words and how I intended my response, this is certainly a very hard problem. Talk to Hunter Systems. Guys like Phoenix Technologies, who use dynamic analysis, have a much easier time, of course. Also, note that the address correspondence array is an extra level of indirection that will have some effect on the performance of the converted program. I would like to know more about PIXIE, especially the techniques used. Are there published reports to which I can refer? Thanks....