cc -68010 option
Alex S. Crain
alex at umbc3.UMD.EDU
Mon Feb 1 10:52:32 AEST 1988
In article <231 at safari.UUCP> dave at 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 at umbc3.umd.edu
alex at umbc3.umd.edu
More information about the Unix-pc.general
mailing list