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]

Re: XScale port contributed


Nick, 

Here's another example of the tuning flags affecting the instruction set 
availability:

arm.c:

+   arm_is_xscale     = (tune_flags & FL_XSCALE) != 0;


arm.md:

+ (define_insn "mulhisi3"
+   [(set (match_operand:SI 0 "s_register_operand" "=r")
+ 	(mult:SI (sign_extend:SI
+ 		  (match_operand:HI 1 "s_register_operand" "%r"))
+ 		 (sign_extend:SI
+ 		  (match_operand:HI 2 "s_register_operand" "r"))))]
+   "TARGET_ARM && arm_is_xscale"
+   "smulbb%?\\t%0,%1,%2"
+   [(set_attr "type" "mult")]
+ )
etc.

Also:

***************
*** 1226,1232 ****
  ;; Unnamed template to match long long unsigned multiply-accumlate 
(umlal)
  
  (define_insn "*umulsidi3adddi"
!   [(set (match_operand:DI 0 "s_register_operand" "=&r")
  	(plus:DI
  	 (mult:DI
  	  (zero_extend:DI (match_operand:SI 2 "s_register_operand" "%r"))
--- 1243,1249 ----
  ;; Unnamed template to match long long unsigned multiply-accumlate 
(umlal)
  
  (define_insn "*umulsidi3adddi"
!   [(set (match_operand:DI 0 "s_register_operand" "+&r")
  	(plus:DI
  	 (mult:DI
  	  (zero_extend:DI (match_operand:SI 2 "s_register_operand" "%r"))

Looks like a bogon.  I fixed these instructions so that they no-longer 
update their input operand.

R.


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