m68k.md (cmpsi): Remove outdated flag_pic handling.

gcc/
	* 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.

From-SVN: r120919
This commit is contained in:
Richard Sandiford 2007-01-18 19:33:01 +00:00
parent 36e04090c1
commit 565e35c947
4 changed files with 26 additions and 11 deletions

View 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>

View file

@ -308,8 +308,6 @@
}
})
;; 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" "")
@ -317,15 +315,6 @@
""
{
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.

View 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.

View file

@ -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);
}
}