(ashlsi3): Use shlo instead of shli.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 26 May 1993 22:39:50 +0000 (15:39 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 26 May 1993 22:39:50 +0000 (15:39 -0700)
From-SVN: r4577

gcc/config/i960/i960.md

index 191cee99032a6cff36defd5ddf7965361ac97334..dd52829104309014545c37cd5ec6e4f164ff4d77 100644 (file)
 \f
 ;; Arithmetic shift instructions.
 
+;; The shli instruction generates an overflow fault if the sign changes.
+;; In the case of overflow, it does not give the natural result, it instead
+;; gives the last shift value before the overflow.  We can not use this
+;; instruction because gcc thinks that arithmetic left shift and logical
+;; left shift are identical, and sometimes canonicalizes the logical left
+;; shift to an arithmetic left shift.  Therefore we must always use the
+;; logical left shift instruction.
+
 (define_insn "ashlsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
        (ashift:SI (match_operand:SI 1 "arith_operand" "dI")
                   (match_operand:SI 2 "arith_operand" "dI")))]
   ""
-  "shli        %2,%1,%0"
+  "shlo        %2,%1,%0"
   [(set_attr "type" "alu2")])
 
 (define_insn "ashrsi3"