Skip to content

Commit b5bb040

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 dd95a1d commit b5bb040

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/tcop/postgres.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2967,10 +2967,15 @@ ProcessInterrupts(void)
29672967
/*
29682968
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
29692969
*
2970-
* We currently support gcc and icc here.
2970+
* We currently support gcc, icc, and HP-UX inline assembly here.
29712971
*/
29722972
#if defined(__ia64__) || defined(__ia64)
29732973

2974+
#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
2975+
#include <ia64/sys/inline.h>
2976+
#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
2977+
#else
2978+
29742979
#ifdef __INTEL_COMPILER
29752980
#include <asm/ia64regs.h>
29762981
#endif
@@ -2991,6 +2996,7 @@ ia64_get_bsp(void)
29912996
#endif
29922997
return ret;
29932998
}
2999+
#endif
29943000
#endif /* IA64 */
29953001

29963002

0 commit comments

Comments
 (0)