Skip to content

Commit e910bd2

Browse files
committed
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.
1 parent 290bb9b commit e910bd2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/tcop/postgres.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,10 +2991,15 @@ ProcessInterrupts(void)
29912991
/*
29922992
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
29932993
*
2994-
* We currently support gcc and icc here.
2994+
* We currently support gcc, icc, and HP-UX inline assembly here.
29952995
*/
29962996
#if defined(__ia64__) || defined(__ia64)
29972997

2998+
#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
2999+
#include <ia64/sys/inline.h>
3000+
#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
3001+
#else
3002+
29983003
#ifdef __INTEL_COMPILER
29993004
#include <asm/ia64regs.h>
30003005
#endif
@@ -3015,7 +3020,7 @@ ia64_get_bsp(void)
30153020
#endif
30163021
return ret;
30173022
}
3018-
3023+
#endif
30193024
#endif /* IA64 */
30203025

30213026

0 commit comments

Comments
 (0)