/************************************************************************
 *
 * This file contains the platform-dependent definitions for IBM PowerPC/
 * RS6000 running AIX.
 *
 *	Copyright (C) 1999-2008 Cincom Systems, Inc.
 *
 ************************************************************************/

#define LEFT_BIT_FIELD_ORDER 1 /* Compiler ordering of bit fields in structs */

#define HaveCleanSignals TRUE
#ifdef PLATFORM_SIGNAL_HANDLER
#	define CanSmashRegisters TRUE
#else
#	define CanSmashRegisters FALSE
#endif
#define HaveLimitRegister TRUE

#define bytesInNMethodZone (1152 * 1024)

#define defaultMappedPermSpaceBase ((quantum *)0x30000000)

#define pdFPUType() 1
#define DOUBLES_ALIGNED
#define StructLayoutAlgorithm "twoFourPadAlignLongLongLayout"

/* Ideally this would be defined in the processor include file, but differences
 * in platform assembler syntax makes this a better place.
 */
#define GlueProc "glueRS6000.h"
#define indirectFunctionPointers 1
/* This is potentially OS-specific and so does belong here.
 */
#define platcallc_h "ibmCallC.h"

#define sc_pc sc_jmpbuf.jmp_context.iar
#define sc_gr sc_jmpbuf.jmp_context.gpr

/* I/O defines */
#define BSD 1
#if platform == platRS6000
#	define PLAT_OSNAME "unix bsd ibm rs6000powerPC aix"
#else
#	define PLAT_OSNAME "unix bsd ibm rs6000power2 aix"
#endif
/* The System V ABI requires 16-byte alignment.
 */
#define C_STACK_POINTER_BYTE_ALIGNMENT 16
#if defined(__GNUC__)
# define getsp() ({ register void *sp;						\
	asm volatile ("ori  %0,r1,0" : "=r"(sp) : : "memory");	\
	sp; })
#elif !defined(assembly)
extern void *getsp(void);
#endif

#define HaveWriteSigiosOnDisplayConnection TRUE
#define SOCKLEN_SIZE_T size_t

#if !defined(PLATFORM_SUPPORTS_64_BITS)
#	define PLATFORM_SUPPORTS_64_BITS 1
#endif
#if !defined(HAS_64_BIT_ARITHMETIC)
#	define HAS_64_BIT_ARITHMETIC 1
#endif
#if !defined(assembly) && HAS_64_BIT_ARITHMETIC
typedef long long longlong;
typedef unsigned long long ulonglong;
#endif
