i386.md (ashrsi3, [...]): Fix typo.
authorJohn Wehle <john@feith.com>
Sat, 8 Apr 2000 04:33:28 +0000 (04:33 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Sat, 8 Apr 2000 04:33:28 +0000 (04:33 +0000)
* i386.md (ashrsi3, ashrhi3, ashrqi3): Fix typo.

* i386.md (floathisf2, floathidf2, floathixf2): New patterns.
* i386.c (print_operand): Use the proper suffix for a 387 HImode
operand.  Abort if a 387 operand has an unsupported size.

From-SVN: r33018

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.md

index c3c5b54..3ed3fff 100644 (file)
@@ -1,3 +1,11 @@
+Sat Apr  8 00:21:51 EDT 2000  John Wehle  (john@feith.com)
+
+       * i386.md (ashrsi3, ashrhi3, ashrqi3): Fix typo.
+
+       * i386.md (floathisf2, floathidf2, floathixf2): New patterns.
+       * i386.c (print_operand): Use the proper suffix for a 387 HImode
+       operand.  Abort if a 387 operand has an unsupported size.
+
 2000-04-08  Neil Booth  <NeilB@earthling.net>
 
        * cppexp.c (parse_charconst): Null does not end character
index c739bf6..9eb13ea 100644 (file)
@@ -3109,12 +3109,10 @@ print_operand (file, x, code)
          /* this is the size of op from size of operand */
          switch (GET_MODE_SIZE (GET_MODE (x)))
            {
-           case 1:
-             putc ('b', file);
-             return;
-
            case 2:
-             putc ('w', file);
+#ifdef HAVE_GAS_FILDS_FISTS
+             putc ('s', file);
+#endif
              return;
 
            case 4:
@@ -3144,6 +3142,9 @@ print_operand (file, x, code)
              else
                putc ('l', file);
              return;
+
+           default:
+             abort ();
            }
 
        case 'b':
index e9a5aa3..dc24d5f 100644 (file)
 ;; Even though we only accept memory inputs, the backend _really_
 ;; wants to be able to do this between registers.
 
+(define_insn "floathisf2"
+  [(set (match_operand:SF 0 "register_operand" "=f,f")
+       (float:SF (match_operand:HI 1 "nonimmediate_operand" "m,r")))]
+  "TARGET_80387"
+  "@
+   fild%z1\\t%1
+   #"
+  [(set_attr "type" "fmov,multi")
+   (set_attr "fp_int_src" "true")])
+
 (define_insn "floatsisf2"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
        (float:SF (match_operand:SI 1 "nonimmediate_operand" "m,r")))]
   [(set_attr "type" "fmov,multi")
    (set_attr "fp_int_src" "true")])
 
+(define_insn "floathidf2"
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+       (float:DF (match_operand:HI 1 "nonimmediate_operand" "m,r")))]
+  "TARGET_80387"
+  "@
+   fild%z1\\t%1
+   #"
+  [(set_attr "type" "fmov,multi")
+   (set_attr "fp_int_src" "true")])
+
 (define_insn "floatsidf2"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
        (float:DF (match_operand:SI 1 "nonimmediate_operand" "m,r")))]
   [(set_attr "type" "fmov,multi")
    (set_attr "fp_int_src" "true")])
 
+(define_insn "floathixf2"
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+       (float:XF (match_operand:HI 1 "nonimmediate_operand" "m,r")))]
+  "TARGET_80387"
+  "@
+   fild%z1\\t%1
+   #"
+  [(set_attr "type" "fmov,multi")
+   (set_attr "fp_int_src" "true")])
+
 (define_insn "floatsixf2"
   [(set (match_operand:XF 0 "register_operand" "=f,f")
        (float:XF (match_operand:SI 1 "nonimmediate_operand" "m,r")))]
 ;; %%% Kill these when reload knows how to do it.
 (define_split
   [(set (match_operand 0 "register_operand" "")
+       (float (match_operand:HI 1 "register_operand" "")))]
+  "reload_completed && FLOAT_MODE_P (GET_MODE (operands[0]))"
+  [(set (mem:HI (pre_dec:SI (reg:SI 7))) (match_dup 1))
+   (set (match_dup 0) (match_dup 2))
+   (set (reg:SI 7) (plus:SI (reg:SI 7) (const_int 2)))]
+  "operands[2] = gen_rtx_FLOAT (GET_MODE (operands[0]),
+                               gen_rtx_MEM (HImode, stack_pointer_rtx));")
+
+(define_split
+  [(set (match_operand 0 "register_operand" "")
        (float (match_operand:SI 1 "register_operand" "")))]
   "reload_completed && FLOAT_MODE_P (GET_MODE (operands[0]))"
   [(set (mem:SI (pre_dec:SI (reg:SI 7))) (match_dup 1))
 
 (define_expand "ashrsi3"
   [(set (match_operand:SI 0 "nonimmediate_operand" "")
-       (lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "")
+       (ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "")
                     (match_operand:QI 2 "nonmemory_operand" "")))
    (clobber (reg:CC 17))]
   ""
 
 (define_expand "ashrhi3"
   [(set (match_operand:HI 0 "nonimmediate_operand" "")
-       (lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "")
+       (ashiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "")
                     (match_operand:QI 2 "nonmemory_operand" "")))
    (clobber (reg:CC 17))]
   "TARGET_HIMODE_MATH"
 
 (define_expand "ashrqi3"
   [(set (match_operand:QI 0 "nonimmediate_operand" "")
-       (lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "")
+       (ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "")
                     (match_operand:QI 2 "nonmemory_operand" "")))
    (clobber (reg:CC 17))]
   "TARGET_QIMODE_MATH"