From: Maciej W. Rozycki Date: Sat, 5 Dec 2020 18:26:26 +0000 (+0000) Subject: VAX: Correct issues with commented-out insns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c085897738b0da9c199eda2476c2563bdbdb292;p=gcc.git VAX: Correct issues with commented-out insns 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'. 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. --- 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 @@ ;; 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 @@ ;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 @@ "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")))]