aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:26 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:26 +0000
commit3c085897738b0da9c199eda2476c2563bdbdb292 (patch)
treefbc3449e6a75d29f65354dcada4408ac2f588667 /gcc
parent2b39f5137a9db4939fd23d39de63257467986f80 (diff)
downloadgcc-3c085897738b0da9c199eda2476c2563bdbdb292.zip
gcc-3c085897738b0da9c199eda2476c2563bdbdb292.tar.gz
gcc-3c085897738b0da9c199eda2476c2563bdbdb292.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/vax/vax.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index 2f6643a..4b0c26d 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")))]