mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 09:20:31 +08:00
i386.md (floatsisf2, [...]): Rewrite using a splitter.
* i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2, floatsixf2, floatdixf2): Rewrite using a splitter. From-SVN: r26145
This commit is contained in:
parent
4bc74ece1e
commit
bc725565df
@ -1,3 +1,8 @@
|
||||
Sat Apr 3 00:53:29 EST 1999 John Wehle (john@feith.com)
|
||||
|
||||
* i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2,
|
||||
floatsixf2, floatdixf2): Rewrite using a splitter.
|
||||
|
||||
Fri Apr 2 17:36:10 1999 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* config/arm/arm.c (arm_print_operand): Print large constants in
|
||||
|
@ -2614,149 +2614,254 @@
|
||||
"* return output_fix_trunc (insn, operands);")
|
||||
|
||||
;; Conversion between fixed point and floating point.
|
||||
;; The actual pattern that matches these is at the end of this file.
|
||||
|
||||
;; ??? Possibly represent floatunssidf2 here in gcc2.
|
||||
|
||||
(define_expand "floatsisf2"
|
||||
[(set (match_operand:SF 0 "register_operand" "")
|
||||
(float:SF (match_operand:SI 1 "nonimmediate_operand" "")))]
|
||||
[(parallel [(set (match_operand:SF 0 "register_operand" "")
|
||||
(float:SF (match_operand:SI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"")
|
||||
|
||||
(define_expand "floatdisf2"
|
||||
[(set (match_operand:SF 0 "register_operand" "")
|
||||
(float:SF (match_operand:DI 1 "nonimmediate_operand" "")))]
|
||||
"TARGET_80387"
|
||||
"")
|
||||
|
||||
(define_expand "floatsidf2"
|
||||
[(set (match_operand:DF 0 "register_operand" "")
|
||||
(float:DF (match_operand:SI 1 "nonimmediate_operand" "")))]
|
||||
"TARGET_80387"
|
||||
"")
|
||||
|
||||
(define_expand "floatdidf2"
|
||||
[(set (match_operand:DF 0 "register_operand" "")
|
||||
(float:DF (match_operand:DI 1 "nonimmediate_operand" "")))]
|
||||
"TARGET_80387"
|
||||
"")
|
||||
|
||||
(define_expand "floatsixf2"
|
||||
[(set (match_operand:XF 0 "register_operand" "")
|
||||
(float:XF (match_operand:SI 1 "nonimmediate_operand" "")))]
|
||||
"TARGET_80387"
|
||||
"")
|
||||
|
||||
(define_expand "floatdixf2"
|
||||
[(set (match_operand:XF 0 "register_operand" "")
|
||||
(float:XF (match_operand:DI 1 "nonimmediate_operand" "")))]
|
||||
"TARGET_80387 && LONG_DOUBLE_TYPE_SIZE == 96"
|
||||
"")
|
||||
|
||||
;; This will convert from SImode or DImode to MODE_FLOAT.
|
||||
"operands[2] = assign_386_stack_local (SImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
|
||||
[(set (match_operand:SF 0 "register_operand" "=f,f")
|
||||
(float:SF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m,m"))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
"#")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
(define_split
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:SI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:SF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:SI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:SF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
|
||||
(float:SF (match_operand:SI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
(define_expand "floatdisf2"
|
||||
[(parallel [(set (match_operand:SF 0 "register_operand" "")
|
||||
(float:SF (match_operand:DI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"operands[2] = assign_386_stack_local (DImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SF 0 "register_operand" "=f,f")
|
||||
(float:SF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m,o"))]
|
||||
"TARGET_80387"
|
||||
"#")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:DI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:SF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:DI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "o"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:SF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:DI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
(define_expand "floatsidf2"
|
||||
[(parallel [(set (match_operand:DF 0 "register_operand" "")
|
||||
(float:DF (match_operand:SI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"operands[2] = assign_386_stack_local (SImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f,f")
|
||||
(float:DF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m,m"))]
|
||||
"TARGET_80387"
|
||||
"#")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:SI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:DF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:SI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:DF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:SI 1 "nonimmediate_operand" "rm")))]
|
||||
(float:DF (match_operand:SI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
(define_expand "floatdidf2"
|
||||
[(parallel [(set (match_operand:DF 0 "register_operand" "")
|
||||
(float:DF (match_operand:DI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"operands[2] = assign_386_stack_local (DImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f,f")
|
||||
(float:DF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m,o"))]
|
||||
"TARGET_80387"
|
||||
"#")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:DI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:DF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:DI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "o"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:DF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(float:DF (match_operand:DI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
(define_expand "floatsixf2"
|
||||
[(parallel [(set (match_operand:XF 0 "register_operand" "")
|
||||
(float:XF (match_operand:SI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"operands[2] = assign_386_stack_local (SImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:XF 0 "register_operand" "=f,f")
|
||||
(float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!*r")))]
|
||||
(float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m,m"))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
"#")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:SI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:XF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:SI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:SI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:XF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(float:SF (match_operand:SI 1 "nonimmediate_operand" "rm")))]
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:SI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"*
|
||||
{
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
output_op_from_reg (operands[1], AS1 (fild%z0,%1));
|
||||
RET;
|
||||
}
|
||||
else if (GET_CODE (operands[1]) == MEM)
|
||||
return AS1 (fild%z1,%1);
|
||||
else
|
||||
abort ();
|
||||
}")
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
(define_expand "floatdixf2"
|
||||
[(parallel [(set (match_operand:XF 0 "register_operand" "")
|
||||
(float:XF (match_operand:DI 1 "nonimmediate_operand" "")))
|
||||
(clobber (match_dup 2))])]
|
||||
"TARGET_80387"
|
||||
"operands[2] = assign_386_stack_local (DImode, 0);")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:XF 0 "register_operand" "=f,f")
|
||||
(float:XF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m,o"))]
|
||||
"TARGET_80387"
|
||||
"#")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:DI 1 "memory_operand" "m")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "m"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 0)
|
||||
(float:XF (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:DI 1 "register_operand" "r")))
|
||||
(clobber (match_operand:DI 2 "memory_operand" "o"))]
|
||||
"TARGET_80387 && reload_completed"
|
||||
[(set (match_dup 2)
|
||||
(match_dup 1))
|
||||
(set (match_dup 0)
|
||||
(float:XF (match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:XF 0 "register_operand" "=f")
|
||||
(float:XF (match_operand:DI 1 "memory_operand" "m")))]
|
||||
"TARGET_80387"
|
||||
"* return AS1 (fild%z1,%1);"
|
||||
[(set_attr "type" "fpop")])
|
||||
|
||||
;;- add instructions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user