Merged ARM-Thumb branch...

Nick Clifton nickc@cygnus.com
Wed Feb 9 11:33:00 GMT 2000


Hi Scott,

: > >-  if (CONSTANT_P (operands[1]) && flag_pic)
: > >+  if (CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
: > >+       || label_mentioned_p (operands[1]) && flag_pic)
: > 
: > This patch was originally written by Pat, as far as I know.  It's been in my
: > tree for years.
: 
: Probably time we integrated it then :).  I'll generate a changelog and submit
: it.

I think you need to fix the parenthesising for this patch as well, to
make it obvious that the tests only apply if flag_pic is true.  Say
something like this:

Cheers
	Nick

2000-02-09  Bambrough  <scottb@netwinder.org>

	* config/arm/arm.md (movsi): In PIC mode, make sure that a
	constant source address is legitimate.

Index: config/arm/arm.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.md,v
retrieving revision 1.34.2.11
diff -p -r1.34.2.11 arm.md
*** arm.md	2000/02/02 19:55:48	1.34.2.11
--- arm.md	2000/02/09 19:29:00
***************
*** 3793,3799 ****
          }
      }
      
!   if (CONSTANT_P (operands[1]) && flag_pic)
      operands[1] = legitimize_pic_address
        (operands[1], SImode, ((reload_in_progress || reload_completed)
  			     ? operands[0] : 0));
--- 3793,3802 ----
          }
      }
      
!   if (flag_pic
!       && (CONSTANT_P (operands[1])
! 	 || symbol_mentioned_p (operands[1])
! 	 || label_mentioned_p (operands[1])))
      operands[1] = legitimize_pic_address
        (operands[1], SImode, ((reload_in_progress || reload_completed)
  			     ? operands[0] : 0));


More information about the Gcc mailing list