/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* $Id$ $Date$ * * PCR architecture */ #ifndef __PCR_Arch_h #define __PCR_Arch_h 1 /* * known architectures -- define *only* the one(s) that apply */ #undef PCR_Arch_SPARC #undef PCR_Arch_SUN4 #if defined(PCR_Arch_SPARC) || defined(PCR_Arch_SUN4) # define PCR_Arch_name "SPARC" #endif #undef PCR_Arch_IBMR6000 #if defined(PCR_Arch_IBMR6000) # define PCR_Arch_name "IBMR6000" #endif #undef PCR_Arch_MIPS #undef PCR_Arch_IRIS #if defined(PCR_Arch_IRIS) # undef PCR_Arch_MIPS # define PCR_Arch_MIPS # define PCR_Arch_name "SGI IRIS" #elif defined(PCR_Arch_MIPS) # define PCR_Arch_name "MIPS" #endif /* * Dimensions of variation ... * * these should *all* be defined with appropriate values. */ /* test-and-set-like instruction exists */ #define PCR_Arch_TAS 0 /* endianness */ #define PCR_Arch_ENDIAN3210 0 /* big */ #define PCR_Arch_ENDIAN0123 0 /* little */ #define PCR_Arch_ENDIAN1032 0 /* weird */ #define PCR_Arch_ENDIAN2301 0 /* weird */ /* word size */ #undef PCR_Arch_STD_SIZES /* 8-bit byte, 16-bit short, 32-bit int/long/ptr */ /* alignment constraint: 0, 0x1, 0x3, 0x7, ... */ #undef PCR_Arch_ALIGN_MASK /* stack direction: > 0 or < 0 */ #undef PCR_Arch_STK_PUSH_DIR /* * Here we actually set this stuff for the chosen architecture */ #if (PCR_Arch_SPARC) || (PCR_Arch_SUN4) # undef PCR_Arch_ENDIAN3210 # define PCR_Arch_ENDIAN3210 1 # define PCR_Arch_STD_SIZES 1 # define PCR_Arch_ALIGN_MASK 0x7 # define PCR_Arch_STK_PUSH_DIR (-1) #elif (PCR_Arch_IBMR6000) # error IBMR6000 NYI #elif (PCR_Arch_IRIS) #else # error unknown arch #endif /* sanity checks */ #if ! PCR_Arch_STD_SIZES # error nonstandard sizes -- someday I will figure this out #endif #if ! defined(PCR_Arch_ALIGN_MASK) # error alignment constraint required #endif #if ! defined(PCR_Arch_STK_PUSH_DIR) # error no stack push direction defined #endif #endif /* ! __PCR_Arch_h */ /* $Log$ */