]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 19:33:01 +0000 (19:33 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 19:33:01 +0000 (19:33 +0000)
* config/m68k/m68k.md (cmpsi): Remove outdated flag_pic handling.

gcc/testsuite/
200x-xx-xx  Nathan Sidwell  <nathan@codesourcery.com>

* gcc.dg/m68k-pic-1.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120919 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/m68k/m68k.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/m68k-pic-1.c [new file with mode: 0644]

index 94e18bfc326e66f5d3a51222a86d966da013f94c..91d9a0c91d34a703622172a470fbf1df501b8b0c 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-18  Richard Sandiford  <richard@codesourcery.com>
+
+       * config/m68k/m68k.md (cmpsi): Remove outdated flag_pic handling.
+
 2007-01-18  Kazu Hirata  <kazu@codesourcery.com>
            Richard Sandiford  <richard@codesourcery.com>
 
index 429f43363bb8fff4094aebc00ef4e89b541f8d2e..f7971923706144738883c9975ec7d9ac4e19a17a 100644 (file)
     }
 })
 
-;; This is the second "hook" for PIC code (in addition to movsi). See
-;; comment of movsi for a description of PIC handling.
 (define_expand "cmpsi"
   [(set (cc0)
        (compare (match_operand:SI 0 "nonimmediate_operand" "")
   ""
 {
   m68k_last_compare_had_fp_operands = 0;
-  if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
-    {
-      /* The source is an address which requires PIC relocation.
-         Call legitimize_pic_address with the source, mode, and a relocation
-         register (a new pseudo, or the final destination if reload_in_progress
-         is set).   Then fall through normally */
-      rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
-      operands[1] = legitimize_pic_address (operands[1], SImode, temp);
-    }
 })
 
 ;; A composite of the cmp, cmpa, cmpi & cmpm m68000 op codes.
index dc33ec9f571d7a8d6268de83c9f2fd130252de4b..bac8a24077f96e2f5a546c3bfcda2c8ba10cd676 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-18  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * gcc.dg/m68k-pic-1.c: New.
+
 2007-01-18  Roger Sayle  <roger@eyesopen.com>
 
        * gfortran.dg/array_memcpy_4.f90: New test case.
diff --git a/gcc/testsuite/gcc.dg/m68k-pic-1.c b/gcc/testsuite/gcc.dg/m68k-pic-1.c
new file mode 100644 (file)
index 0000000..631c252
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target m68k-*-* } }  */
+/* { dg-options "-O2 -fpic" }  */
+
+extern void Foo (void *);
+
+char *ary[] = {"a", "b", "c", "d", "e"};
+
+void Bar (void)
+{
+  int cnt = 0;
+
+  for (cnt = 0; cnt < 4;  ++cnt)
+    {
+      char *ptr = ary[cnt];
+
+      Foo (&ptr);
+    }
+}