Skip to content

Commit 4f5ed3a

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 1de4b9a commit 4f5ed3a

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
@@ -2547,10 +2547,15 @@ ProcessInterrupts(void)
25472547
/*
25482548
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
25492549
*
2550-
* We currently support gcc and icc here.
2550+
* We currently support gcc, icc, and HP-UX inline assembly here.
25512551
*/
25522552
#if defined(__ia64__) || defined(__ia64)
25532553

2554+
#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
2555+
#include <ia64/sys/inline.h>
2556+
#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
2557+
#else
2558+
25542559
#ifdef __INTEL_COMPILER
25552560
#include <asm/ia64regs.h>
25562561
#endif
@@ -2571,7 +2576,7 @@ ia64_get_bsp(void)
25712576
#endif
25722577
return ret;
25732578
}
2574-
2579+
#endif
25752580
#endif /* IA64 */
25762581

25772582

0 commit comments

Comments
 (0)