cc -68010 option
dave munroe
dave at safari.UUCP
Thu Jan 28 19:03:59 AEST 1988
>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:
- support for virtual memory (by stacking the machine state during
a page fault and then continuing the instruction after the page
has been brought in)
- support for a virtual machine concept by making MOVE to/from SR
privileged, plus MOVEC, MOVES, and MOVE from CCR.
- additional registers for supervisor mode programming: the Vector
Base Register and alternate function code registers (SFC, DFC).
- different exception handling (e.g. for bus [addressing] errors)
- a two-word (4-byte) prefetch queue and a special "loop mode" of
operation. Loop mode is transparent to the programmer and is
entered when certain common instructions are used with the DBcc
instruction, e.g. here
loop: move.w (a0)+,(a1)+
dbeq d0,loop
the 68010 enters a loop mode. Looping in this mode is efficient
since only operand fetches are performed until the exit condition
is met (opcode fetches are eliminated since the move.w is held
in the instruction decode register and the dbeq is held in the
prefetch queue).
So, for most programming situations, you are not likely to see any differences
by specifying cc -68010. It would be nice if some compilers were smart enough
to optimize code so that the loop mode could be taken advantage of, but I
don't know of any that do.
-dave
More information about the Unix-pc.general
mailing list