+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>
}
})
-;; 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.
+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.
--- /dev/null
+/* { 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);
+ }
+}