From: Heikki Linnakangas Date: Wed, 13 Apr 2011 08:43:22 +0000 (+0300) Subject: On IA64 architecture, we check the depth of the register stack in addition X-Git-Tag: REL8_3_15~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cbb8c36c8d83edba975b59a534e972d82375fbe9;p=thirdparty%2Fpostgresql.git 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. --- diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 4b0d8fe0a67..10a0dcd9a9d 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2693,10 +2693,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 @@ -2717,7 +2722,7 @@ ia64_get_bsp(void) #endif return ret; } - +#endif #endif /* IA64 */