Skip to content

Commit cbb8c36

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 502ff05 commit cbb8c36

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
@@ -2693,10 +2693,15 @@ ProcessInterrupts(void)
26932693
/*
26942694
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
26952695
*
2696-
* We currently support gcc and icc here.
2696+
* We currently support gcc, icc, and HP-UX inline assembly here.
26972697
*/
26982698
#if defined(__ia64__) || defined(__ia64)
26992699

2700+
#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
2701+
#include <ia64/sys/inline.h>
2702+
#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
2703+
#else
2704+
27002705
#ifdef __INTEL_COMPILER
27012706
#include <asm/ia64regs.h>
27022707
#endif
@@ -2717,7 +2722,7 @@ ia64_get_bsp(void)
27172722
#endif
27182723
return ret;
27192724
}
2720-
2725+
#endif
27212726
#endif /* IA64 */
27222727

27232728

0 commit comments

Comments
 (0)