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]

Re: Your change to jump.c breaks conditional move?


On Thu, Jun 04, 1998 at 11:27:08AM -0700, H.J. Lu wrote:
> I think either way we should handle it. We can put abort () there if
> we don't think it is very likely. Otherwise, we handle it like PLUS.

Ok, here is an alternate patch.  I also realized I should have
been checking the other side of the op for a symbol.


r~


Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.64
diff -c -p -d -r1.64 expr.c
*** expr.c	1998/06/02 22:48:51	1.64
--- expr.c	1998/06/04 18:51:50
*************** force_operand (value, target)
*** 4525,4530 ****
--- 4525,4542 ----
    /* Use subtarget as the target for operand 0 of a binary operation.  */
    register rtx subtarget = (target != 0 && GET_CODE (target) == REG ? target : 0);
  
+   /* Check for a PIC address load.  */
+   if (flag_pic
+       && (GET_CODE (value) == PLUS || GET_CODE (value) == MINUS)
+       && XEXP (value, 0) == pic_offset_table_rtx
+       && GET_CODE (XEXP (value, 1)) == SYMBOL_REF)
+     {
+       if (!subtarget)
+ 	subtarget = gen_reg_rtx (GET_MODE (value));
+       emit_move_insn (subtarget, value);
+       return subtarget;
+     }
+ 
    if (GET_CODE (value) == PLUS)
      binoptab = add_optab;
    else if (GET_CODE (value) == MINUS)


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