OSDN Git Service

* arm.c (thumb_legitimate_address_p): Only allow constant pool
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2004 13:24:37 +0000 (13:24 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2004 13:24:37 +0000 (13:24 +0000)
references from SImode.
* arm.md (thumb_movhi_insn): Don't allow minipool references.

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

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md

index c4f3918..c7ec9b3 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-13  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm.c (thumb_legitimate_address_p): Only allow constant pool 
+       references from SImode.
+       * arm.md (thumb_movhi_insn): Don't allow minipool references.
+
 2004-01-13  Kazu Hirata  <kazu@cs.umass.edu>
 
        * system.h (TEXT_SECTION): Poison.
index c8dc024..6cf226e 100644 (file)
@@ -1,6 +1,6 @@
 /* Output routines for GCC for ARM.
-   Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   Free Software Foundation, Inc.
+   Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002, 2003, 2004  Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
    More major hacks by Richard Earnshaw (rearnsha@arm.com).
@@ -2997,6 +2997,7 @@ thumb_legitimate_address_p (enum machine_mode mode, rtx x, int strict_p)
     }
 
   else if (GET_MODE_CLASS (mode) != MODE_FLOAT
+          && GET_MODE_SIZE (mode) == 4
           && GET_CODE (x) == SYMBOL_REF
           && CONSTANT_POOL_ADDRESS_P (x)
           && !(flag_pic
index a6d6d2f..9f10d10 100644 (file)
@@ -1,6 +1,6 @@
 ;;- Machine description for ARM for GNU compiler
 ;;  Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
-;;  2001, 2002, 2003  Free Software Foundation, Inc.
+;;  2001, 2002, 2003 2004  Free Software Foundation, Inc.
 ;;  Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
 ;;  and Martin Simmons (@harleqn.co.uk).
 ;;  More major hacks by Richard Earnshaw (rearnsha@arm.com).
 )
 
 (define_insn "*thumb_movhi_insn"
-  [(set (match_operand:HI 0 "nonimmediate_operand" "=l,l, m,*r,*h,l")
-       (match_operand:HI 1 "general_operand"       "l,mn,l,*h,*r,I"))]
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=l,l,m,*r,*h,l")
+       (match_operand:HI 1 "general_operand"       "l,m,l,*h,*r,I"))]
   "TARGET_THUMB
    && (   register_operand (operands[0], HImode)
        || register_operand (operands[1], HImode))"
       return \"ldrh    %0, %1\";
     }"
   [(set_attr "length" "2,4,2,2,2,2")
-   (set_attr "type" "*,load,store1,*,*,*")
-   (set_attr "pool_range" "*,64,*,*,*,*")]
+   (set_attr "type" "*,load,store1,*,*,*")]
 )