[nvptx,committed] Define TARGET_HAVE_SPECULATION_SAFE_VALUE

Message ID 20180801135411.7aqegsq54zvnth2e@delia
State New
Headers show
Series
  • [nvptx,committed] Define TARGET_HAVE_SPECULATION_SAFE_VALUE
Related show

Commit Message

Tom de Vries Aug. 1, 2018, 1:54 p.m.
Hi,

this defines new target hook TARGET_HAVE_SPECULATION_SAFE_VALUE for nvptx.
Since AFAIK nvidia claims the related security issue does not exist on their
video hardware, we set it to speculation_safe_value_not_needed.

Build and reg-tested on x86_64 with nvptx accelerator.

Committed.

Thanks,
- Tom

[nvptx] Define TARGET_HAVE_SPECULATION_SAFE_VALUE

2018-08-01  Tom de Vries  <tdevries@suse.de>

	PR target/86800
	* config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
	speculation_safe_value_not_needed.

---
 gcc/config/nvptx/nvptx.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index c1946e75f42..c0b0a2ec3ab 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -6048,6 +6048,9 @@  nvptx_can_change_mode_class (machine_mode, machine_mode, reg_class_t)
 #undef TARGET_CAN_CHANGE_MODE_CLASS
 #define TARGET_CAN_CHANGE_MODE_CLASS nvptx_can_change_mode_class
 
+#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-nvptx.h"