- #!/bin/ksh93
- #
- # print the C preprocessor symbols used by SSE
- #
- builtin cat
- compound c
- c.compiler="gcc"
- c.s1="$( ${c.compiler} -E -dM -m32 - < /dev/null | sort )"
- c.s2="$( ${c.compiler} -E -dM -m32 -mfpmath=sse -msse2 - < /dev/null | sort )"
- diff -u <(cat <<<"${c.s1}") <(cat <<<"${c.s2}")
- # EOF.
- rmainz@derfwpc5131:~/work/math_sse_test$ ksh test_math_sse.ksh
- --- /dev/fd/3 2022-09-13 20:01:30.993682803 +0200
- +++ /dev/fd/4 2022-09-13 20:01:30.993682803 +0200
- @@ -133,8 +133,8 @@
- #define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
- #define __FLT_DIG__ 6
- #define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
- -#define __FLT_EVAL_METHOD__ 2
- -#define __FLT_EVAL_METHOD_TS_18661_3__ 2
- +#define __FLT_EVAL_METHOD__ 0
- +#define __FLT_EVAL_METHOD_TS_18661_3__ 0
- #define __FLT_HAS_DENORM__ 1
- #define __FLT_HAS_INFINITY__ 1
- #define __FLT_HAS_QUIET_NAN__ 1
- @@ -247,6 +247,7 @@
- #define __LONG_LONG_WIDTH__ 64
- #define __LONG_MAX__ 0x7fffffffL
- #define __LONG_WIDTH__ 32
- +#define __MMX__ 1
- #define __NO_INLINE__ 1
- #define __ORDER_BIG_ENDIAN__ 4321
- #define __ORDER_LITTLE_ENDIAN__ 1234
- @@ -289,6 +290,10 @@
- #define __SIZEOF_WINT_T__ 4
- #define __SIZE_TYPE__ unsigned int
- #define __SIZE_WIDTH__ 32
- +#define __SSE__ 1
- +#define __SSE2__ 1
- +#define __SSE2_MATH__ 1
- +#define __SSE_MATH__ 1
- #define __STDC__ 1
- #define __STDC_HOSTED__ 1
- #define __STDC_IEC_559__ 1
gcc/clang CPP symbols for SSE math
Posted by Anonymous on Tue 13th Sep 2022 19:08
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.