From: John Wehle Date: Sat, 8 Apr 2000 04:33:28 +0000 (+0000) Subject: i386.md (ashrsi3, [...]): Fix typo. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=155d8a473c79aa5a557ee37306f83b28353b06d4;p=platform%2Fupstream%2Fgcc.git i386.md (ashrsi3, [...]): Fix typo. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3c5b54..3ed3fff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 * cppexp.c (parse_charconst): Null does not end character diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c739bf6..9eb13ea 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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': diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e9a5aa3..dc24d5f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3135,6 +3135,16 @@ ;; 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")))] @@ -3155,6 +3165,16 @@ [(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")))] @@ -3175,6 +3195,16 @@ [(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")))] @@ -3198,6 +3228,16 @@ ;; %%% 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)) @@ -6052,7 +6092,7 @@ (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))] "" @@ -6088,7 +6128,7 @@ (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" @@ -6124,7 +6164,7 @@ (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"