aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-08-31 14:43:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-08-31 14:43:10 -0400
commit2c713d6ea29c91cd2cbd92fa801a61e55ea2a3c4 (patch)
treef6075e56570ee8587f38b4ef91b83acfcbebe1a4 /src/backend/tcop/postgres.c
parenta65e086453e0dea5cdd7f9fe9dc6c34d8bfc0f2c (diff)
downloadpostgresql-2c713d6ea29c91cd2cbd92fa801a61e55ea2a3c4.tar.gz
postgresql-2c713d6ea29c91cd2cbd92fa801a61e55ea2a3c4.zip
Remove theoretically-unnecessary special case for icc.
Intel's icc is generally able to swallow asm blocks written for gcc. We have a few places that don't seem to know that, though. Experiment with removing the special case for icc in ia64_get_bsp(); if the buildfarm likes this, I'll try more cleanup. This is a good test case because it involves a "stop" notation that seems like it might not be very portable.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index ce4bdafad9b..d6a15c1b370 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2997,33 +2997,27 @@ ProcessInterrupts(void)
/*
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
*
- * We currently support gcc, icc, and HP-UX inline assembly here.
+ * We currently support gcc, icc, and HP-UX's native compiler here.
*/
#if defined(__ia64__) || defined(__ia64)
-#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
+#if defined(__hpux) && !defined(__GNUC__) && !defined(__INTEL_COMPILER)
+/* Assume it's HP-UX native 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
-
+/* Use inline assembly; works with gcc and icc */
static __inline__ char *
ia64_get_bsp(void)
{
char *ret;
-#ifndef __INTEL_COMPILER
/* the ;; is a "stop", seems to be required before fetching BSP */
__asm__ __volatile__(
";;\n"
" mov %0=ar.bsp \n"
: "=r"(ret));
-#else
- ret = (char *) __getReg(_IA64_REG_AR_BSP);
-#endif
+
return ret;
}
#endif