summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-12-01 23:07:08 +0000
committerJose Fonseca <jfonseca@vmware.com>2015-12-02 07:51:04 +0000
commit56aff6bb4eafe35ba301f5d60027377abc4cfd9f (patch)
treeab4fb5d62248754462ebfc00e0197b66bec11817
parent51564f04b77e6d29a888a4fbd83d96de062ac634 (diff)
downloadexternal_mesa3d-56aff6bb4eafe35ba301f5d60027377abc4cfd9f.tar.gz
external_mesa3d-56aff6bb4eafe35ba301f5d60027377abc4cfd9f.tar.bz2
external_mesa3d-56aff6bb4eafe35ba301f5d60027377abc4cfd9f.zip
Remove Sun CC specific code.
Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--include/c99_compat.h6
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c10
-rw-r--r--src/gallium/include/pipe/p_compiler.h6
-rw-r--r--src/gallium/include/pipe/p_config.h4
-rw-r--r--src/glsl/ir_constant_expression.cpp8
-rw-r--r--src/glsl/nir/nir_constant_expressions.py8
-rw-r--r--src/mapi/glapi/gen/gl_XML.py6
-rw-r--r--src/mapi/glapi/glapi.h2
-rw-r--r--src/mesa/main/compiler.h14
-rw-r--r--src/util/macros.h2
10 files changed, 11 insertions, 55 deletions
diff --git a/include/c99_compat.h b/include/c99_compat.h
index 4fc91bc135..4be5b7e125 100644
--- a/include/c99_compat.h
+++ b/include/c99_compat.h
@@ -81,8 +81,6 @@
/* Intel compiler supports inline keyword */
# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
# define inline __inline
-# elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
- /* C99 supports inline keyword */
# elif (__STDC_VERSION__ >= 199901L)
/* C99 supports inline keyword */
# else
@@ -100,8 +98,6 @@
#ifndef restrict
# if (__STDC_VERSION__ >= 199901L)
/* C99 */
-# elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
- /* C99 */
# elif defined(__GNUC__)
# define restrict __restrict__
# elif defined(_MSC_VER)
@@ -118,8 +114,6 @@
#ifndef __func__
# if (__STDC_VERSION__ >= 199901L)
/* C99 */
-# elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
- /* C99 */
# elif defined(__GNUC__)
# define __func__ __FUNCTION__
# elif defined(_MSC_VER)
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index d1f9e97868..c719d3a77f 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -182,7 +182,7 @@ static int has_cpuid(void)
static inline void
cpuid(uint32_t ax, uint32_t *p)
{
-#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
__asm __volatile (
"xchgl %%ebx, %1\n\t"
"cpuid\n\t"
@@ -193,7 +193,7 @@ cpuid(uint32_t ax, uint32_t *p)
"=d" (p[3])
: "0" (ax)
);
-#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64)
+#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64)
__asm __volatile (
"cpuid\n\t"
: "=a" (p[0]),
@@ -219,7 +219,7 @@ cpuid(uint32_t ax, uint32_t *p)
static inline void
cpuid_count(uint32_t ax, uint32_t cx, uint32_t *p)
{
-#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
__asm __volatile (
"xchgl %%ebx, %1\n\t"
"cpuid\n\t"
@@ -230,7 +230,7 @@ cpuid_count(uint32_t ax, uint32_t cx, uint32_t *p)
"=d" (p[3])
: "0" (ax), "2" (cx)
);
-#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64)
+#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64)
__asm __volatile (
"cpuid\n\t"
: "=a" (p[0]),
@@ -281,7 +281,7 @@ PIPE_ALIGN_STACK static inline boolean sse2_has_daz(void)
} PIPE_ALIGN_VAR(16) fxarea;
fxarea.mxcsr_mask = 0;
-#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO))
+#if defined(PIPE_CC_GCC)
__asm __volatile ("fxsave %0" : "+m" (fxarea));
#elif (defined(PIPE_CC_MSVC) && _MSC_VER >= 1700) || defined(PIPE_CC_ICL)
/* 1700 = Visual Studio 2012 */
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 7eed57018b..c48a55e22f 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -132,7 +132,7 @@ typedef unsigned char boolean;
/* Macros for data alignment. */
-#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) || defined(__SUNPRO_CC)
+#if defined(__GNUC__)
/* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Type-Attributes.html */
#define PIPE_ALIGN_TYPE(_alignment, _type) _type __attribute__((aligned(_alignment)))
@@ -178,10 +178,6 @@ void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
#define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier()
-#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-
-#define PIPE_READ_WRITE_BARRIER() __machine_rw_barrier()
-
#else
#warning "Unsupported compiler"
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index ac14f86fdc..0b570c7894 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -77,10 +77,6 @@
#define PIPE_CC_ICL
#endif
-#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-#define PIPE_CC_SUNPRO
-#endif
-
/*
* Processor architecture
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 67ed3605a8..ef70585161 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -41,14 +41,6 @@
#include "glsl_types.h"
#include "program/hash_table.h"
-#if defined(__SUNPRO_CC) && !defined(isnormal)
-#include <ieeefp.h>
-static int isnormal(double x)
-{
- return fpclass(x) == FP_NORMAL;
-}
-#endif
-
static float
dot_f(ir_constant *op0, ir_constant *op1)
{
diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
index b16ef503c9..32784f6398 100644
--- a/src/glsl/nir/nir_constant_expressions.py
+++ b/src/glsl/nir/nir_constant_expressions.py
@@ -32,14 +32,6 @@ template = """\
#include "util/half_float.h"
#include "nir_constant_expressions.h"
-#if defined(__SUNPRO_CC)
-#include <ieeefp.h>
-static int isnormal(double x)
-{
- return fpclass(x) == FP_NORMAL;
-}
-#endif
-
/**
* Evaluate one component of packSnorm4x8.
*/
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index 67aba81a74..2e7123ec40 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -183,7 +183,7 @@ class gl_print_base(object):
The name is also added to the file's undef_list.
"""
self.undef_list.append("PURE")
- print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+ print """# if defined(__GNUC__)
# define PURE __attribute__((pure))
# else
# define PURE
@@ -223,7 +223,7 @@ class gl_print_base(object):
"""
self.undef_list.append(S)
- print """# if (defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) && defined(__ELF__))
+ print """# if defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define %s __attribute__((visibility("%s")))
# else
# define %s
@@ -243,7 +243,7 @@ class gl_print_base(object):
"""
self.undef_list.append("NOINLINE")
- print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+ print """# if defined(__GNUC__)
# define NOINLINE __attribute__((noinline))
# else
# define NOINLINE
diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h
index 673295bca4..f269b1701b 100644
--- a/src/mapi/glapi/glapi.h
+++ b/src/mapi/glapi/glapi.h
@@ -61,7 +61,7 @@ extern "C" {
# else
# define _GLAPI_EXPORT __declspec(dllimport)
# endif
-# elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# elif defined(__GNUC__)
# define _GLAPI_EXPORT __attribute__((visibility("default")))
# else
# define _GLAPI_EXPORT
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 93b4e6f12d..c5ee7412b6 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -47,20 +47,6 @@ extern "C" {
/**
- * Sun compilers define __i386 instead of the gcc-style __i386__
- */
-#ifdef __SUNPRO_C
-# if !defined(__i386__) && defined(__i386)
-# define __i386__
-# elif !defined(__amd64__) && defined(__amd64)
-# define __amd64__
-# elif !defined(__sparc__) && defined(__sparc)
-# define __sparc__
-# endif
-#endif
-
-
-/**
* Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN, and CPU_TO_LE32.
* Do not use these unless absolutely necessary!
* Try to use a runtime test instead.
diff --git a/src/util/macros.h b/src/util/macros.h
index 5014b918b5..0c8958feae 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -186,7 +186,7 @@ do { \
* inline a static function that we later use in an alias. - ajax
*/
#ifndef PUBLIC
-# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__)
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
# elif defined(_MSC_VER)