summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog23
-rw-r--r--libgcc/config/i386/shadow-stack-unwind.h24
-rw-r--r--libgcc/config/xtensa/ieee754-df.S1
-rw-r--r--libgcc/config/xtensa/ieee754-sf.S1
-rw-r--r--libgcc/configure17
5 files changed, 53 insertions, 13 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 1eb16631e03..0e9e7759f62 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,26 @@
+2018-02-20 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/ieee754-df.S (__adddf3_aux): Add
+ .literal_position directive.
+ * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
+
+2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ PR target/84148
+ * configure: Regenerate.
+
+2018-02-16 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ PR target/84239
+ * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
+ Include cetintrin.h not x86intrin.h.
+
+2018-02-08 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ PR target/84239
+ * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
+ Use new _get_ssp and _inc_ssp intrinsics.
+
2018-02-02 Julia Koval <julia.koval@intel.com>
* config/i386/cpuinfo.h (processor_subtypes): Add INTEL_COREI7_ICELAKE.
diff --git a/libgcc/config/i386/shadow-stack-unwind.h b/libgcc/config/i386/shadow-stack-unwind.h
index ef75d97aa2f..b7c3d98a9dc 100644
--- a/libgcc/config/i386/shadow-stack-unwind.h
+++ b/libgcc/config/i386/shadow-stack-unwind.h
@@ -22,30 +22,30 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#ifdef __x86_64__
-# define incssp(x) __builtin_ia32_incsspq ((x))
-# define rdssp(x) __builtin_ia32_rdsspq (x)
-#else
-# define incssp(x) __builtin_ia32_incsspd ((x))
-# define rdssp(x) __builtin_ia32_rdsspd (x)
-#endif
+/* NB: We need _get_ssp and _inc_ssp from <cetintrin.h>. But we can't
+ include <x86intrin.h> which ends up including <mm_malloc.h>, which
+ includes <stdlib.h> and <errno.h> unconditionally. But we can't
+ include any libc system headers unconditionally from libgcc. Avoid
+ including <mm_malloc.h> here by defining _IMMINTRIN_H_INCLUDED. */
+#define _IMMINTRIN_H_INCLUDED
+#include <cetintrin.h>
+#undef _IMMINTRIN_H_INCLUDED
/* Unwind the shadow stack for EH. */
#undef _Unwind_Frames_Extra
#define _Unwind_Frames_Extra(x) \
do \
{ \
- unsigned long ssp = 0; \
- ssp = rdssp (ssp); \
+ _Unwind_Word ssp = _get_ssp (); \
if (ssp != 0) \
{ \
- unsigned long tmp = (x); \
+ _Unwind_Word tmp = (x); \
while (tmp > 255) \
{ \
- incssp (tmp); \
+ _inc_ssp (tmp); \
tmp -= 255; \
} \
- incssp (tmp); \
+ _inc_ssp (tmp); \
} \
} \
while (0)
diff --git a/libgcc/config/xtensa/ieee754-df.S b/libgcc/config/xtensa/ieee754-df.S
index 2662a660075..a997c1b4263 100644
--- a/libgcc/config/xtensa/ieee754-df.S
+++ b/libgcc/config/xtensa/ieee754-df.S
@@ -55,6 +55,7 @@ __negdf2:
#ifdef L_addsubdf3
+ .literal_position
/* Addition */
__adddf3_aux:
diff --git a/libgcc/config/xtensa/ieee754-sf.S b/libgcc/config/xtensa/ieee754-sf.S
index d48b230a758..695c67b0fc8 100644
--- a/libgcc/config/xtensa/ieee754-sf.S
+++ b/libgcc/config/xtensa/ieee754-sf.S
@@ -55,6 +55,7 @@ __negsf2:
#ifdef L_addsubsf3
+ .literal_position
/* Addition */
__addsf3_aux:
diff --git a/libgcc/configure b/libgcc/configure
index 38a28c2a48f..3241f19ab67 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -4790,18 +4790,28 @@ else
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5
+$as_echo_n "checking for CET support... " >&6; }
+
case "$host" in
i[34567]86-*-linux* | x86_64-*-linux*)
case "$enable_cet" in
default)
- # Check if assembler supports CET.
+ # Check if target supports multi-byte NOPs
+ # and if assembler supports CET insn.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
+
+#if !defined(__SSE2__)
+#error target does not support multi-byte NOPs
+#else
asm ("setssbsy");
+#endif
+
;
return 0;
}
@@ -4841,6 +4851,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
if test x$enable_cet = xyes; then
CET_FLAGS="-fcf-protection -mcet"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi