aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJohn Wehle <john@feith.com>2000-04-08 04:33:28 +0000
committerJohn Wehle <wehle@gcc.gnu.org>2000-04-08 04:33:28 +0000
commit155d8a473c79aa5a557ee37306f83b28353b06d4 (patch)
tree388cfb9a421393c5148dad45374df036b7a3b0f9 /gcc/config
parent4ddf4d7b814ee1138262464b2e9fc1a7905a68ac (diff)
downloadgcc-155d8a473c79aa5a557ee37306f83b28353b06d4.zip
gcc-155d8a473c79aa5a557ee37306f83b28353b06d4.tar.gz
gcc-155d8a473c79aa5a557ee37306f83b28353b06d4.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c11
-rw-r--r--gcc/config/i386/i386.md46
2 files changed, 49 insertions, 8 deletions
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"