This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ifcvt without cmove


As much as I'd been trying to avoid conditional compilation in
favour of constant folding to true or false, emit_conditional_move
does not exist without HAVE_conditional_move, causing link errors.



r~

        * ifcvt.c (noce_emit_cmove): Conditionally compile call to
        emit_conditional_move.

Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ifcvt.c,v
retrieving revision 1.4
diff -c -p -d -r1.4 ifcvt.c
*** ifcvt.c	2000/05/01 06:55:44	1.4
--- ifcvt.c	2000/05/01 21:20:44
*************** noce_emit_cmove (if_info, x, code, cmp_a
*** 758,767 ****
--- 758,775 ----
        || ! general_operand (cmp_b, GET_MODE (cmp_b)))
      return NULL_RTX;
  
+ #if HAVE_conditional_move
    return emit_conditional_move (x, code, cmp_a, cmp_b, VOIDmode,
  				vtrue, vfalse, GET_MODE (x),
  			        (code == LTU || code == GEU
  				 || code == LEU || code == GTU));
+ #else
+   /* We'll never get here, as noce_process_if_block doesn't call the
+      functions involved.  Ifdef code, however, should be discouraged
+      because it leads to typos in the code not selected.  However, 
+      emit_conditional_move won't exist either.  */
+   return NULL_RTX;
+ #endif
  }
  
  /* Try only simple constants and registers here.  More complex cases

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]