Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!star.cs.vu.nl!ast From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Re: PIC inferior to regular code Message-ID: <6718@star.cs.vu.nl> Date: 27 May 90 18:50:07 GMT References: <20318@nigel.udel.EDU> Sender: news@cs.vu.nl Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 17 In article <20318@nigel.udel.EDU> V2057A%TEMPLEVM.BITNET@cornellc.cit.cornell.edu (Juan Jose Noyles) writes: >Andy (Dr. Tanenbaum?), you mentioned that PIC is inferior to regular code. In >what ways? And are you referring to regular as in relocatable code? Is this >just an architectural phenomenon, or does it affect all Von Neumann CPUs? It very much depends on the CPU. For the 68000, we looked at PIC code carefully, and concluded that nearly all the time we could generate better code in space and time if we were not constrained to PIC. A simple example. You can't call subroutines using the normal call instruction because it puts the ABSOLUTE ADDRESS of the place to return to on the stack. If the program is moved in memory before the return is made, when the RET is done, the program takes off into outer space. Thus you need a more complicated linkage mechanism. It can be done, but it takes more instructions and more time than the standard call. Same is true of lots of other things. Andy Tanenbaum (ast@cs.vu.nl)