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]

Small patch to expand_builtin_setjmp


Hi Guys,

  I would like to submit the following patch for approval.  It fixes a
  small buglet in expand_builtin_setjmp where it uses force_reg to
  load a piece of RTL that looks like this: (plus (reg) (const_int))
  into a register.  Some architectures (eg the Thumb) cannot do this
  just using a movsi pattern, and so it is necessary to call
  force_operand first, to make sure that the address is loaded into a
  register using an addsi pattern.

Cheers
	Nick


Wed Jul 28 18:20:24 1999  Nick Clifton  <nickc@cygnus.com>

	* builtins.c (expand_builtin_setjmp): Use force_operand to
	make sure that the buffer address is in a suitable form to be
	passed to force_reg.

Index: builtins.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/builtins.c,v
retrieving revision 1.3
diff -p -r1.3 builtins.c
*** builtins.c	1999/07/27 05:43:56	1.3
--- builtins.c	1999/07/28 17:04:31
*************** expand_builtin_setjmp (buf_addr, target,
*** 306,312 ****
    buf_addr = convert_memory_address (Pmode, buf_addr);
  #endif
  
!   buf_addr = force_reg (Pmode, buf_addr);
  
    if (target == 0 || GET_CODE (target) != REG
        || REGNO (target) < FIRST_PSEUDO_REGISTER)
--- 306,312 ----
    buf_addr = convert_memory_address (Pmode, buf_addr);
  #endif
  
!   buf_addr = force_reg (Pmode, force_operand (buf_addr, NULL_RTX));
  
    if (target == 0 || GET_CODE (target) != REG
        || REGNO (target) < FIRST_PSEUDO_REGISTER)


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