From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public From: Richie Bielak Subject: Re: Assembler most efficient??? (was Re: What is wrong with OO ?) Date: 1997/01/13 Message-ID: <32DA40EE.2C3C@calfp.com>#1/1 X-Deja-AN: 209514898 x-nntp-posting-host: host025.nyc.interactive.net references: <5a0niaINNlda@topdog.cs.umbc.edu> <32C43AC8.24E2@sn.no> <32C557F6.532C@rase.com> <5aa0eo$thd@krusty.irvine.com> <5aadbr$ad8@masters0.InterNex.Net> <32D64433.41C6@wi.leidenuniv.nl> <32D6C18B.30A8@calfp.com> x-nntp-posting-user: (Unauthenticated) content-type: text/plain; charset=us-ascii x-trace: 853164726/6204 organization: IBS Interactive, Inc. mime-version: 1.0 newsgroups: comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng x-mailer: Mozilla 3.0Gold (X11; I; SunOS 5.4 sun4m) Date: 1997-01-13T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Richie said > > "Part of the difficulty compilers have with generating good code > is that CPUs are being designed by people who coded in assembler > and never had to write a compiler." > > Do you really have evidence of this? [...] > > I can think of some examples in the past where instruction sets have been > designed with far too much naive input from high level language and > compiler considerations, but none of them seem to have survived into the > modern RISC era. My comments were mostly based on what I read about Wirth's work on Modula-2, Oberon, Lilith etc., which I realize I somewhat outdated. I know that many of the RISC processors are designed more with the compiler in mind. My favorite example of a compiler going wrong with the instruction set provided, was DEC's old COBOL compiler on the VAX. As you must know, VAX provided many instructions specifically aimed at making code generation easier (eg. INDEX, LOCC, SCAN etc). In one case the COBOL compiler generated exponential algorithm for a linear problem using those fancy instructions. Finally, to get back to the orignal topic, I think that on the modern RISC processors it is more likely for a compiler to generate faster code than what could be hand written in assembler. ...richie -- * richieb@netlabs.net - at home | Richie Bielak * * richieb@calfp.com - at work | * * Home page: http://www.netlabs.net/hp/richieb * * "Fight software piracy, use free software!" (me) *