aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-04-13 11:43:22 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-04-13 11:53:06 +0300
commitf16907b98b6ff906e4d0a9f54da07535379968dc (patch)
treeaedabc2e0881a3d6cbbfb8d24217f2c4b5f93dbd
parenta2f9219e7053bf2395c50b198379d1073dbc2298 (diff)
downloadpostgresql-f16907b98b6ff906e4d0a9f54da07535379968dc.tar.gz
postgresql-f16907b98b6ff906e4d0a9f54da07535379968dc.zip
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.
-rw-r--r--src/backend/tcop/postgres.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index bd8287e68d1..ed5df86ab42 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2686,10 +2686,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 <ia64/sys/inline.h>
+#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
+#else
+
#ifdef __INTEL_COMPILER
#include <asm/ia64regs.h>
#endif
@@ -2710,7 +2715,7 @@ ia64_get_bsp(void)
#endif
return ret;
}
-
+#endif
#endif /* IA64 */