diff gcc/optabs.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/optabs.h	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/optabs.h	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* Definitions for code generation pass of GNU compiler.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -41,7 +41,8 @@
 };
 
 /* Information about an operand for instruction expansion.  */
-struct expand_operand {
+class expand_operand {
+public:
   /* The type of operand.  */
   ENUM_BITFIELD (expand_operand_type) type : 8;
 
@@ -70,13 +71,14 @@
    to their default values.  */
 
 static inline void
-create_expand_operand (struct expand_operand *op,
+create_expand_operand (class expand_operand *op,
 		       enum expand_operand_type type,
 		       rtx value, machine_mode mode,
 		       bool unsigned_p, poly_int64 int_value = 0)
 {
   op->type = type;
   op->unsigned_p = unsigned_p;
+  op->target = 0;
   op->unused = 0;
   op->mode = mode;
   op->value = value;
@@ -86,7 +88,7 @@
 /* Make OP describe an operand that must use rtx X, even if X is volatile.  */
 
 static inline void
-create_fixed_operand (struct expand_operand *op, rtx x)
+create_fixed_operand (class expand_operand *op, rtx x)
 {
   create_expand_operand (op, EXPAND_FIXED, x, VOIDmode, false);
 }
@@ -97,7 +99,7 @@
    be ignored in that case.  */
 
 static inline void
-create_output_operand (struct expand_operand *op, rtx x,
+create_output_operand (class expand_operand *op, rtx x,
 		       machine_mode mode)
 {
   create_expand_operand (op, EXPAND_OUTPUT, x, mode, false);
@@ -109,7 +111,7 @@
    as an operand.  */
 
 static inline void
-create_input_operand (struct expand_operand *op, rtx value,
+create_input_operand (class expand_operand *op, rtx value,
 		      machine_mode mode)
 {
   create_expand_operand (op, EXPAND_INPUT, value, mode, false);
@@ -119,7 +121,7 @@
    to mode MODE.  UNSIGNED_P says whether VALUE is unsigned.  */
 
 static inline void
-create_convert_operand_to (struct expand_operand *op, rtx value,
+create_convert_operand_to (class expand_operand *op, rtx value,
 			   machine_mode mode, bool unsigned_p)
 {
   create_expand_operand (op, EXPAND_CONVERT_TO, value, mode, unsigned_p);
@@ -128,10 +130,14 @@
 /* Make OP describe an input operand that should have the same value
    as VALUE, after any mode conversion that the backend might request.
    If VALUE is a CONST_INT, it should be treated as having mode MODE.
-   UNSIGNED_P says whether VALUE is unsigned.  */
+   UNSIGNED_P says whether VALUE is unsigned.
+
+   The conversion of VALUE can include a combination of numerical
+   conversion (as for convert_modes) and duplicating a scalar to fill
+   a vector (if VALUE is a scalar but the operand is a vector).  */
 
 static inline void
-create_convert_operand_from (struct expand_operand *op, rtx value,
+create_convert_operand_from (class expand_operand *op, rtx value,
 			     machine_mode mode, bool unsigned_p)
 {
   create_expand_operand (op, EXPAND_CONVERT_FROM, value, mode, unsigned_p);
@@ -142,12 +148,12 @@
    of the address, but it may need to be converted to Pmode first.  */
 
 static inline void
-create_address_operand (struct expand_operand *op, rtx value)
+create_address_operand (class expand_operand *op, rtx value)
 {
   create_expand_operand (op, EXPAND_ADDRESS, value, Pmode, false);
 }
 
-extern void create_integer_operand (struct expand_operand *, poly_int64);
+extern void create_integer_operand (class expand_operand *, poly_int64);
 
 /* Passed to expand_simple_binop and expand_binop to say which options
    to try to use if the requested operation can't be open-coded on the
@@ -237,6 +243,12 @@
    (without splitting it into pieces).  */
 extern int can_compare_p (enum rtx_code, machine_mode,
 			  enum can_compare_purpose);
+
+/* Return whether the backend can emit a vector comparison for code CODE,
+   comparing operands of mode CMP_OP_MODE and producing a result with
+   VALUE_MODE.  */
+extern bool can_vcond_compare_p (enum rtx_code, machine_mode, machine_mode);
+
 extern rtx prepare_operand (enum insn_code, rtx, int, machine_mode,
 			    machine_mode, int);
 /* Emit a pair of rtl insns to compare two rtx's and to jump
@@ -335,21 +347,21 @@
 extern bool insn_operand_matches (enum insn_code icode, unsigned int opno,
 				  rtx operand);
 extern bool valid_multiword_target_p (rtx);
-extern void create_convert_operand_from_type (struct expand_operand *op,
+extern void create_convert_operand_from_type (class expand_operand *op,
 					      rtx value, tree type);
 extern bool maybe_legitimize_operands (enum insn_code icode,
 				       unsigned int opno, unsigned int nops,
-				       struct expand_operand *ops);
+				       class expand_operand *ops);
 extern rtx_insn *maybe_gen_insn (enum insn_code icode, unsigned int nops,
-				 struct expand_operand *ops);
+				 class expand_operand *ops);
 extern bool maybe_expand_insn (enum insn_code icode, unsigned int nops,
-			       struct expand_operand *ops);
+			       class expand_operand *ops);
 extern bool maybe_expand_jump_insn (enum insn_code icode, unsigned int nops,
-				    struct expand_operand *ops);
+				    class expand_operand *ops);
 extern void expand_insn (enum insn_code icode, unsigned int nops,
-			 struct expand_operand *ops);
+			 class expand_operand *ops);
 extern void expand_jump_insn (enum insn_code icode, unsigned int nops,
-			      struct expand_operand *ops);
+			      class expand_operand *ops);
 
 extern enum rtx_code get_rtx_code (enum tree_code tcode, bool unsignedp);