OSDN Git Service

* expr.c (convert_modes): Check for legal hard register.
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Mar 2003 00:12:40 +0000 (00:12 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Mar 2003 00:12:40 +0000 (00:12 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63813 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expr.c

index 7b0adc1..07a7c49 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-04  Steve Ellcey  <sje@cup.hp.com>
+
+       * expr.c (convert_modes): Check for legal hard register.
+
 2003-03-04  Tom Tromey  <tromey@redhat.com>
 
        * doc/sourcebuild.texi (Front End Directory): Document tags.
index 39940cb..c0119af 100644 (file)
@@ -1406,6 +1406,8 @@ convert_modes (mode, oldmode, x, unsignedp)
                  && ((GET_CODE (x) == MEM && ! MEM_VOLATILE_P (x)
                       && direct_load[(int) mode])
                      || (GET_CODE (x) == REG
+                         && (! HARD_REGISTER_P (x)
+                             || HARD_REGNO_MODE_OK (REGNO (x), mode))
                          && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
                                                    GET_MODE_BITSIZE (GET_MODE (x)))))))))
     {