[nios2,committed] Define TARGET_HAVE_SPECULATION_SAFE_VALUE

Message ID ac358450-34f1-ccba-4e08-72c35152b7a4@codesourcery.com
State New
Headers show
Series
  • [nios2,committed] Define TARGET_HAVE_SPECULATION_SAFE_VALUE
Related show

Commit Message

Sandra Loosemore Aug. 3, 2018, 10:44 p.m.
I've checked in this patch to fix the c-c++-common/spec-barrier-1.c test 
failure on nios2.  Per previous discussions about Spectre 
vulnerabilities with Altera/Intel, this architecture is not affected so 
no special handling is required here.

-Sandra

Comments

Richard Earnshaw (lists) Aug. 9, 2018, 4:54 p.m. | #1
On 03/08/18 23:44, Sandra Loosemore wrote:
> I've checked in this patch to fix the c-c++-common/spec-barrier-1.c test
> failure on nios2.  Per previous discussions about Spectre
> vulnerabilities with Altera/Intel, this architecture is not affected so
> no special handling is required here.
> 
> -Sandra
> 
> gcc.log
> 
> 
> 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
> 
> 	gcc/
> 	* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
> 	Define.
> 

I nearly missed this patch for my accumulated back-porting list since it
didn't have the PR number in it.

Just adding it so that I can track things properly.  The original commit
landed as r263301.

R.

> 
> gcc.patch
> 
> 
> Index: gcc/config/nios2/nios2.c
> ===================================================================
> --- gcc/config/nios2/nios2.c	(revision 263298)
> +++ gcc/config/nios2/nios2.c	(working copy)
> @@ -5572,6 +5572,9 @@ nios2_adjust_reg_alloc_order (void)
>  #undef TARGET_CONSTANT_ALIGNMENT
>  #define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings
>  
> +#undef TARGET_HAVE_SPECULATION_SAFE_VALUE
> +#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>  
>  #include "gt-nios2.h"
>
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d5a23f..e9b764d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -370,6 +370,7 @@
 
 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
 
+	PR target/86799
 	* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
 	Define.

Patch

Index: gcc/config/nios2/nios2.c
===================================================================
--- gcc/config/nios2/nios2.c	(revision 263298)
+++ gcc/config/nios2/nios2.c	(working copy)
@@ -5572,6 +5572,9 @@  nios2_adjust_reg_alloc_order (void)
 #undef TARGET_CONSTANT_ALIGNMENT
 #define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings
 
+#undef TARGET_HAVE_SPECULATION_SAFE_VALUE
+#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-nios2.h"