Blame SOURCES/gcc48-rh1482762.patch

85359c
2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
85359c
85359c
	PR target/80180
85359c
	* config/i386/i386.c (ix86_expand_builtin)
85359c
	<IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
85359c
	flags reg setting and flags reg using instructions.
85359c
	<IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
85359c
	clobbering instructions to zero extend op2.
85359c
85359c
--- gcc/config/i386/i386.c	(revision 246478)
85359c
+++ gcc/config/i386/i386.c	(revision 246479)
85359c
@@ -39533,9 +39533,6 @@
85359c
       mode0 = DImode;
85359c
 
85359c
 rdrand_step:
85359c
-      op0 = gen_reg_rtx (mode0);
85359c
-      emit_insn (GEN_FCN (icode) (op0));
85359c
-
85359c
       arg0 = CALL_EXPR_ARG (exp, 0);
85359c
       op1 = expand_normal (arg0);
85359c
       if (!address_operand (op1, VOIDmode))
85359c
@@ -39543,6 +39540,10 @@
85359c
 	  op1 = convert_memory_address (Pmode, op1);
85359c
 	  op1 = copy_addr_to_reg (op1);
85359c
 	}
85359c
+
85359c
+      op0 = gen_reg_rtx (mode0);
85359c
+      emit_insn (GEN_FCN (icode) (op0));
85359c
+
85359c
       emit_move_insn (gen_rtx_MEM (mode0, op1), op0);
85359c
 
85359c
       op1 = gen_reg_rtx (SImode);
85359c
@@ -39584,9 +39597,6 @@
85359c
       mode0 = DImode;
85359c
 
85359c
 rdseed_step:
85359c
-      op0 = gen_reg_rtx (mode0);
85359c
-      emit_insn (GEN_FCN (icode) (op0));
85359c
-
85359c
       arg0 = CALL_EXPR_ARG (exp, 0);
85359c
       op1 = expand_normal (arg0);
85359c
       if (!address_operand (op1, VOIDmode))
85359c
@@ -39594,6 +39604,10 @@
85359c
 	  op1 = convert_memory_address (Pmode, op1);
85359c
 	  op1 = copy_addr_to_reg (op1);
85359c
 	}
85359c
+
85359c
+      op0 = gen_reg_rtx (mode0);
85359c
+      emit_insn (GEN_FCN (icode) (op0));
85359c
+
85359c
       emit_move_insn (gen_rtx_MEM (mode0, op1), op0);
85359c
 
85359c
       op2 = gen_reg_rtx (QImode);