Correct issues with commented-out insns, which fail to build if enabled:
.../gcc/config/vax/vax.md:503:1: repeated operand number 1
.../gcc/config/vax/vax.md:503:1: repeated operand number 2
and then when the issue with the repeated operands has been corrected:
.../gcc/config/vax/vax.md:107:1: destination operand 0 allows non-lvalue
.../gcc/config/vax/vax.md:503:1: destination operand 0 allows non-lvalue
.../gcc/config/vax/vax.md:503:1: destination operand 3 allows non-lvalue
.../gcc/config/vax/vax.md:744:1: destination operand 0 allows non-lvalue
Fix the RTL with the repeated operands and change the relevant output
operand predicates not to allow immediates.
Also emit MOVO rather than MOVH assembly instruction with the `movti'
insn so that the condition codes are set according to the integer rather
than floating-point interpretation of the datum moved, as expected with
the operation associated with the pattern.
Finally give `*amulsi4' a name, for easier reference here and elsewhere.
We may eventually want to have some of these insns enabled at `-Os'.
ChangeLog:
* gcc/config/vax/vax.md (movti): Fix output predicate. Emit
`movo' rather than `movh'.
(divmoddisi4): Fix output predicates, correct RTL.
(*amulsi4): Name insn. Fix output predicate.
---
gcc/config/vax/vax.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index 2f6643abe5c..4b0c26d1d58 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -105,10 +105,10 @@ (define_insn "mov<mode>"
;; Some VAXen don't support this instruction.
;;(define_insn "movti"
-;; [(set (match_operand:TI 0 "general_operand" "=g")
+;; [(set (match_operand:TI 0 "nonimmediate_operand" "=g")
;; (match_operand:TI 1 "general_operand" "g"))]
;; ""
-;; "movh %1,%0")
+;; "movo %1,%0")
(define_insn "movdi"
[(set (match_operand:DI 0 "nonimmediate_operand" "=g")
@@ -501,12 +501,12 @@ (define_insn "div<mode>3"
;This is left out because it is very slow;
;we are better off programming around the "lack" of this insn.
;(define_insn "divmoddisi4"
-; [(set (match_operand:SI 0 "general_operand" "=g")
+; [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
; (div:SI (match_operand:DI 1 "general_operand" "g")
; (match_operand:SI 2 "general_operand" "g")))
-; (set (match_operand:SI 3 "general_operand" "=g")
-; (mod:SI (match_operand:DI 1 "general_operand" "g")
-; (match_operand:SI 2 "general_operand" "g")))]
+; (set (match_operand:SI 3 "nonimmediate_operand" "=g")
+; (mod:SI (match_dup 1)
+; (match_dup 2)))]
; ""
; "ediv %2,%1,%0,%3")
@@ -741,8 +741,8 @@ (define_insn ""
"rotl %2,%1,%0")
;This insn is probably slower than a multiply and an add.
-;(define_insn ""
-; [(set (match_operand:SI 0 "general_operand" "=g")
+;(define_insn "*amulsi4"
+; [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
; (mult:SI (plus:SI (match_operand:SI 1 "general_operand" "g")
; (match_operand:SI 2 "general_operand" "g"))
; (match_operand:SI 3 "general_operand" "g")))]
--
2.11.0