aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1999-02-08 14:58:08 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>1999-02-08 14:58:08 +0000
commite42efef59003a43c21f31430a75cc52bd5a1e451 (patch)
tree7566b02cde2284cadfa984a20819e2da61c429f9 /gcc
parentb2e9a2fdc876ea464044c9e2338313cff1a4a679 (diff)
downloadgcc-e42efef59003a43c21f31430a75cc52bd5a1e451.zip
gcc-e42efef59003a43c21f31430a75cc52bd5a1e451.tar.gz
gcc-e42efef59003a43c21f31430a75cc52bd5a1e451.tar.bz2
c4x.md (*movhi_stik): New pattern.
* config/c4x/c4x.md (*movhi_stik): New pattern. (movhi): Allow some immediate constants to be directly stored in memory. From-SVN: r25091
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/c4x/c4x.md11
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8d18280..4826798 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Tue Feb 9 11:55:04 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * config/c4x/c4x.md (*movhi_stik): New pattern.
+ (movhi): Allow some immediate constants to be directly
+ stored in memory.
+
Tue Feb 9 11:34:15 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.md (all call patterns): Add constraints "Ur".
diff --git a/gcc/config/c4x/c4x.md b/gcc/config/c4x/c4x.md
index 3d7b0f7..d49b411 100644
--- a/gcc/config/c4x/c4x.md
+++ b/gcc/config/c4x/c4x.md
@@ -5370,6 +5370,13 @@
; TWO OPERAND LONG LONG INSTRUCTIONS
;
+(define_insn "*movhi_stik"
+ [(set (match_operand:HI 0 "memory_operand" "=m")
+ (match_operand:HI 1 "stik_const_operand" "K"))]
+ "! TARGET_C3X"
+ "#"
+ [(set_attr "type" "multi")])
+
; We could load some constants using define_splits for the C30
; in the large memory model---these would emit shift and or insns.
(define_expand "movhi"
@@ -5395,7 +5402,9 @@
[(set (match_operand:HI 0 "src_operand" "")
(match_operand:HI 1 "src_operand" ""))]
"reload_completed
- && (reg_operand (operands[0], HImode) || reg_operand (operands[1], HImode))"
+ && (reg_operand (operands[0], HImode)
+ || reg_operand (operands[1], HImode)
+ || stik_const_operand (operands[1], HImode))"
[(set (match_dup 2) (match_dup 3))
(set (match_dup 4) (match_dup 5))]
"operands[2] = c4x_operand_subword (operands[0], 0, 1, HImode);