pa.c (legitimize_pic_address): Clarify comments.
authorJeffrey A Law <law@cygnus.com>
Mon, 2 Aug 1999 09:45:16 +0000 (09:45 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 2 Aug 1999 09:45:16 +0000 (03:45 -0600)
        * pa.c (legitimize_pic_address): Clarify comments.  Do not call the
        pic_load_label generator directly.
        * pa.md (pic_load_label): Clarify comments.  Remove modes on operands.
        No longer a named pattern.

From-SVN: r28401

gcc/ChangeLog
gcc/config/pa/pa.c
gcc/config/pa/pa.md

index d8aa90b5c8dd4efcb3325e7f49ac8a430a947f12..e213373257e69b5459619b56192e1c4af10070b3 100644 (file)
@@ -1,3 +1,10 @@
+Mon Aug  2 03:38:33 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * pa.c (legitimize_pic_address): Clarify comments.  Do not call the
+       pic_load_label generator directly.
+       * pa.md (pic_load_label): Clarify comments.  Remove modes on operands.
+       No longer a named pattern.
+
 Mon Aug  2 09:38:10 1999  Nick Clifton  <nickc@cygnus.com>
 
        * explow.c (force_reg): Call force_operand if X does not
index 209976d473df41d6819fc399f238cb38c428e201..f5873f738dffa972fba90e7fe9bc6afbc38d51c7 100644 (file)
@@ -628,7 +628,16 @@ legitimize_pic_address (orig, mode, reg)
   /* Labels need special handling.  */
   if (pic_label_operand (orig))
     {
-      emit_insn (gen_pic_load_label (reg, orig));
+      /* We do not want to go through the movXX expanders here since that
+        would create recursion.
+
+        Nor do we really want to call a generator for a named pattern
+        since that requires multiple patterns if we want to support
+        multiple word sizes.
+
+        So instead we just emit the raw set, which avoids the movXX
+        expanders completely.  */
+      emit_insn (gen_rtx_SET (VOIDmode, reg, orig));
       current_function_uses_pic_offset_table = 1;
       return reg;
     }
index e667d3cc1229c15415876f67364344d5a83e24e7..c78692d7dc934f9f4efdc750b9856643a480068d 100644 (file)
   [(set_attr "type" "store")
    (set_attr "length" "4")])
 
-;; For pic
+;; For loading the address of a label while generating PIC code.
 ;; Note since this pattern can be created at reload time (via movsi), all
 ;; the same rules for movsi apply here.  (no new pseudos, no temporaries).
-(define_insn "pic_load_label"
-  [(set (match_operand:SI 0 "register_operand" "=a")
-       (match_operand:SI 1 "pic_label_operand" ""))]
+(define_insn ""
+  [(set (match_operand 0 "register_operand" "=a")
+       (match_operand 1 "pic_label_operand" ""))]
   ""
   "*
 {