Skip to content

Commit 2c713d6

Browse files
committed
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.
1 parent a65e086 commit 2c713d6

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/backend/tcop/postgres.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2997,33 +2997,27 @@ ProcessInterrupts(void)
29972997
/*
29982998
* IA64-specific code to fetch the AR.BSP register for stack depth checks.
29992999
*
3000-
* We currently support gcc, icc, and HP-UX inline assembly here.
3000+
* We currently support gcc, icc, and HP-UX's native compiler here.
30013001
*/
30023002
#if defined(__ia64__) || defined(__ia64)
30033003

3004-
#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER
3004+
#if defined(__hpux) && !defined(__GNUC__) && !defined(__INTEL_COMPILER)
3005+
/* Assume it's HP-UX native compiler */
30053006
#include <ia64/sys/inline.h>
30063007
#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
30073008
#else
3008-
3009-
#ifdef __INTEL_COMPILER
3010-
#include <asm/ia64regs.h>
3011-
#endif
3012-
3009+
/* Use inline assembly; works with gcc and icc */
30133010
static __inline__ char *
30143011
ia64_get_bsp(void)
30153012
{
30163013
char *ret;
30173014

3018-
#ifndef __INTEL_COMPILER
30193015
/* the ;; is a "stop", seems to be required before fetching BSP */
30203016
__asm__ __volatile__(
30213017
";;\n"
30223018
" mov %0=ar.bsp \n"
30233019
: "=r"(ret));
3024-
#else
3025-
ret = (char *) __getReg(_IA64_REG_AR_BSP);
3026-
#endif
3020+
30273021
return ret;
30283022
}
30293023
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy