From e910bd2dfee154c2b010befac4f9b28bbc46003a Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 13 Apr 2011 11:43:22 +0300 Subject: [PATCH] On IA64 architecture, we check the depth of the register stack in addition to the regular stack. The code to do that is platform and compiler specific, add support for the HP-UX native compiler. --- src/backend/tcop/postgres.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 3470575039..9bfeba5113 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2991,10 +2991,15 @@ ProcessInterrupts(void) /* * IA64-specific code to fetch the AR.BSP register for stack depth checks. * - * We currently support gcc and icc here. + * We currently support gcc, icc, and HP-UX inline assembly here. */ #if defined(__ia64__) || defined(__ia64) +#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER +#include +#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE))) +#else + #ifdef __INTEL_COMPILER #include #endif @@ -3015,7 +3020,7 @@ ia64_get_bsp(void) #endif return ret; } - +#endif #endif /* IA64 */ -- 2.11.0