  
    if (NEED_INDICATE_EXEC_STACK)
      file_end_indicate_exec_stack ();
-@@ -8688,6 +8717,8 @@
+@@ -8602,8 +8631,9 @@
+ 					    + frame.padding0),
+ 				   style);
+       /* If not an i386, mov & pop is faster than "leave".  */
+-      else if (TARGET_USE_LEAVE || optimize_function_for_size_p (cfun)
+-	       || !cfun->machine->use_fast_prologue_epilogue)
++      else if (!flag_control_integrity &&
++               (TARGET_USE_LEAVE || optimize_function_for_size_p (cfun)
++	       || !cfun->machine->use_fast_prologue_epilogue))
+ 	emit_insn ((*ix86_gen_leave) ());
+       else
+ 	{
+@@ -8688,6 +8718,8 @@
    if (style == 0)
      return;
  

 }
 
 /* Reset from the function's potential modifications.  */
@@ -8746,6 +8793,87 @@
    grossly off.  Return -1 if the address contains ASHIFT, so it is not
    strictly valid, but still used for computing length of lea instruction.  */
 

 	  emit_move_insn (reg, new_rtx);
 	  new_rtx = reg;
 	}
@@ -9653,7 +9847,7 @@
 	      new_rtx = reg;
 	    }
 	  else
