aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
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:50:55 +0300
commitb5bb040da63806f7386b3434c38e1fa98860ea88 (patch)
tree73abddf25ce345a350f5b3ca709ed2e7b0f83ad7 /src/backend/tcop/postgres.c
parentdd95a1d3dd52cb9848d54ab9962156f666c4ca39 (diff)
downloadpostgresql-b5bb040da63806f7386b3434c38e1fa98860ea88.tar.gz
postgresql-b5bb040da63806f7386b3434c38e1fa98860ea88.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.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 805514b07b4..59b7666c109 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2967,10 +2967,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
@@ -2991,6 +2996,7 @@ ia64_get_bsp(void)
#endif
return ret;
}
+#endif
#endif /* IA64 */