This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to remove x86 FP operations which allowed integers


This patch removes the FP compare, add, subtract, multiply, and
divide patterns which allowed integer operands since:

  1) The "Intel Architecture Optimization Manual" recommends against
     their use.

  2) A move is performed behind the scenes when an i386 register
     is the source of the integer operand.  This interferes with
     scheduling.

ChangeLog:

Mon Mar 29 00:50:08 EST 1999  John Wehle  (john@feith.com)

	* i386.md: Delete floating point compare, add, subtract,
	multiply, and divide patterns which allowed integer
	operands.
	* i386.c (output_386_binary_op): Delete unused code.
	(output_float_compare): Likewise.

Enjoy!

-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/config/i386/i386.md.ORIGINAL	Sun Mar 28 00:22:17 1999
--- gcc/config/i386/i386.md	Mon Mar 29 00:24:25 1999
***************
*** 513,540 ****
    [(set (cc0)
  	(match_operator 2 "VOIDmode_compare_op"
  			[(match_operand:XF 0 "register_operand" "f")
- 			 (float:XF
- 			  (match_operand:SI 1 "nonimmediate_operand" "rm"))]))
-    (clobber (match_scratch:HI 3 "=a"))]
-   "TARGET_80387"
-   "* return output_float_compare (insn, operands);"
-   [(set_attr "type" "fcompare")])
- 
- (define_insn ""
-   [(set (cc0)
- 	(match_operator 2 "VOIDmode_compare_op"
- 			[(float:XF
- 			  (match_operand:SI 0 "nonimmediate_operand" "rm"))
- 			 (match_operand:XF 1 "register_operand" "f")]))
-    (clobber (match_scratch:HI 3 "=a"))]
-   "TARGET_80387"
-   "* return output_float_compare (insn, operands);"
-   [(set_attr "type" "fcompare")])
- 
- (define_insn ""
-   [(set (cc0)
- 	(match_operator 2 "VOIDmode_compare_op"
- 			[(match_operand:XF 0 "register_operand" "f")
  			 (float_extend:XF
  			  (match_operand:DF 1 "nonimmediate_operand" "fm"))]))
     (clobber (match_scratch:HI 3 "=a"))]
--- 513,518 ----
***************
*** 599,626 ****
    [(set (cc0)
  	(match_operator 2 "VOIDmode_compare_op"
  			[(match_operand:DF 0 "register_operand" "f")
- 			 (float:DF
- 			  (match_operand:SI 1 "nonimmediate_operand" "rm"))]))
-    (clobber (match_scratch:HI 3 "=a"))]
-   "TARGET_80387"
-   "* return output_float_compare (insn, operands);"
-   [(set_attr "type" "fcompare")])
- 
- (define_insn ""
-   [(set (cc0)
- 	(match_operator 2 "VOIDmode_compare_op"
- 			[(float:DF
- 			  (match_operand:SI 0 "nonimmediate_operand" "rm"))
- 			 (match_operand:DF 1 "register_operand" "f")]))
-    (clobber (match_scratch:HI 3 "=a"))]
-   "TARGET_80387"
-   "* return output_float_compare (insn, operands);"
-   [(set_attr "type" "fcompare")])
- 
- (define_insn ""
-   [(set (cc0)
- 	(match_operator 2 "VOIDmode_compare_op"
- 			[(match_operand:DF 0 "register_operand" "f")
  			 (float_extend:DF
  			  (match_operand:SF 1 "nonimmediate_operand" "fm"))]))
     (clobber (match_sc




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]