Path: utzoo!utgpu!water!watmath!uunet!umbc3!alex From: alex@umbc3.UMD.EDU (Alex S. Crain) Newsgroups: unix-pc.general Subject: Re: cc -68010 option Message-ID: <764@umbc3.UMD.EDU> Date: 1 Feb 88 00:52:32 GMT References: <231@safari.UUCP> Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain) Distribution: unix-pc Organization: University of Maryland, Baltimore County Lines: 33 In article <231@safari.UUCP> dave@safari.UUCP (dave munroe) writes: >>someone awhile back said that the default cc compiles to the 68000 >>instruction >>set and that you need to specify -68010 to get that instruction set. >>However, i compiled a program both ways and the a.out was the same. >>So whats the story do i need to use -68010 ????? > >The differences between the 68010 and 68000 are mainly in the areas of >systems programming: [diff -c 68000 68010 > /dev/null] A quick link of /bin/echo to /lib/ccom and /lib/optim (the peephole optimizer) shows that if you specify -68000 or -68010, NOTHING HAPPENS! the cc program simply eats the option and goes along its way. Dave is correct in saying that the usable differences in the instruction sets are small, basicly the dbxx and rtd instructions. The former is a tight loop mode that requires significant reworking if the code structure that must (must ?) be done BEFORE code generation, and therefore cannot be done in a peephole optimizer. The second is an extended rts instruction that allows faster returns from functions with a fixed # of arguments. Dave is also correct is sating that /lib/ccom has never heard of these instructions. SO, the answer to the first question (how to get 68010 code) is "you can't" (partially true) or "get another compiler". There are compilers that know about tight loops and rtd, such as gcc, the Free Software Foundation compiler, which does a great deal of front end optimization (fix the code before we emit it). Unfortunatly, These compilers are either expensive, or in the case of gcc, free but still under development. -- :alex. nerwin!alex@umbc3.umd.edu alex@umbc3.umd.edu