cpp(1) predefines for the 68000

Fred Christiansen fred at mot.UUCP
Tue Oct 30 09:27:54 AEST 1984


{}
	Within Motorola, M68000 refers to the family of microprocessors, of
which the MC68000, MC68010, and MC68020 are instances.  Other M68000 suppliers,
such as Mostek (e.g., MK68000), Signetics, Thomson-CSF, and Hitachi, have their
own unique prefix.
	In our development of the SGS 68000 C compiler for UNIX System V/M68000
with AT&T Bell Labs, we sought an #ifdef predefine which would indicate the
hardware family architecture (such as 'vax' for all vaxen, 'pdp11' for all
pdp11's), and decided on 'm68k'.  We specifically avoided an 'mc' prefix as
that smacked of parochialism.  We also avoided 'm68000' as that suggests
specificity over generality.
	In the event that an #ifdef is needed for something very processor
specific (handling stack faults, for instance), our practice has been to
add an #ifdef (or extend an #if) with M68000, M68010, or M68020, making
the definition (-D) in the makefile.  The capital M is arbitrary but consistent
with the mechanism we recommend for identifying the target processor to the
compiler (via an environment variable PROCESSOR), to enable specific code
generation, and to makefiles.

(P.S. To Guy Harris and others:  Version 8 is an AT&T Bell Labs internal
version worked on by the Research Group.  It is not known as System 8.
Future releases from AT&T Tech will continue to have System V in the name.
At least, this is what I have gleaned from Usenix and from the trade shows.)



More information about the Comp.lang.c mailing list