diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-01-06 15:44:34 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-01-06 15:44:34 -0500 |
commit | 1eec766a06047091101fde85fb85959701d0175f (patch) | |
tree | 91ba43fbccef545712241913937322fd39081346 /gcc | |
parent | 345dd8a1412e649c14fd8cea1b700f383456c648 (diff) | |
download | gcc-1eec766a06047091101fde85fb85959701d0175f.zip gcc-1eec766a06047091101fde85fb85959701d0175f.tar.gz gcc-1eec766a06047091101fde85fb85959701d0175f.tar.bz2 |
(movhi): Corrected case of moving constant to memory.
From-SVN: r13389
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/1750a/1750a.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/config/1750a/1750a.md b/gcc/config/1750a/1750a.md index fb7c7bf..1a118fc 100644 --- a/gcc/config/1750a/1750a.md +++ b/gcc/config/1750a/1750a.md @@ -1,6 +1,6 @@ ;;- Machine description for GNU compiler ;;- MIL-STD-1750A version. -;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ;; Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de). ;; This file is part of GNU CC. @@ -451,9 +451,14 @@ "" " { - if (GET_CODE(operands[0]) == MEM && - GET_CODE(operands[1]) == MEM) - operands[1] = force_reg (HImode, operands[1]); + if (GET_CODE(operands[0]) == MEM) + { + rtx op1 = operands[1]; + if (GET_CODE(op1) == MEM + || (GET_CODE(op1) == CONST_INT + && (INTVAL(op1) < 0 || INTVAL(op1) > 15))) + operands[1] = force_reg (HImode, operands[1]); + } }") |