diff options
author | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-01-18 19:33:01 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-01-18 19:33:01 +0000 |
commit | 565e35c947856aca0d02fd0db6456a5ba1611739 (patch) | |
tree | b6893787de4482b49a5a727d8cdfb4c7bd281bf8 /gcc | |
parent | 36e04090c1fe913d3f1a2d5bf2f8cc9c645083f5 (diff) | |
download | gcc-565e35c947856aca0d02fd0db6456a5ba1611739.zip gcc-565e35c947856aca0d02fd0db6456a5ba1611739.tar.gz gcc-565e35c947856aca0d02fd0db6456a5ba1611739.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.md | 11 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/m68k-pic-1.c | 18 |
4 files changed, 26 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94e18bf..91d9a0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 429f433..f797192 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -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. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dc33ec9..bac8a24 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 0000000..631c252 --- /dev/null +++ b/gcc/testsuite/gcc.dg/m68k-pic-1.c @@ -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); + } +} |