/************************************************************************
 *
 * This file contains the platform-dependent definitions for HP workstations
 * with the PA RISC processor.
 *
 *	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 *)0x7ab00000)

#define DOUBLES_ALIGNED

/* This platform is problematic.  SIGIO is difficult to get delivered and
 * sometimes wakeups are lost.  So use polling and only sleep for 500 msecs.
 */
#define PSEUDOPOLL
#define MAXWAITMILLISECONDS 500

#define sc_pc sc_ctxt.sl.sl_ss.ss_narrow.ss_pcoq_head /* for usvSig.c */
#define SC_PC uc_mcontext.ss_narrow.ss_pcoq_head /* for svr4Sig.c */

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

#define pdFPUType() 1

/* According to "The 32-bit PA-RISC Run-time Architecture Document" (see
 * doc/vm.html for URL) the HP PA-RISC 2.0 ABI requires 64 byte alignment.
 * But actual +DA2.0 programs compiled with the HP C compiler only exhibit
 * 16-byte alignment.  Sigh...
 */
#define C_STACK_POINTER_BYTE_ALIGNMENT 16
#if !defined(assembly)
extern void *getsp(void);
#endif

/* I/O defines */
#define USV 0
#define HP_UX 1
#define PLAT_OSNAME "unix sysv hp 700 hp-ux"
#define HaveWriteSigiosOnDisplayConnection FALSE
#define SHLIB_EXTENSION ".sl"

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