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]
Other format: [Raw text]

RE: [Patch] Fix instruction length of jcc_fused


Oops, this patch needn't core2.md.

Index: i386.md
===================================================================
--- i386.md	(revision 3923)
+++ i386.md	(working copy)
@@ -421,6 +421,9 @@
 	 ]
 	 (const_int 1)))
 
+(define_attr "length_jcc_fuse" ""
+  (const_int 0))
+
 ;; The (bounding maximum) length of an instruction in bytes.
 ;; ??? fistp and frndint are in fact fldcw/{fistp,frndint}/fldcw
sequences.
 ;; Later we may want to split them and compute proper length as for
@@ -442,7 +445,8 @@
 	       (plus (attr "prefix_rep")
 		     (plus (attr "prefix_data16")
 			   (plus (attr "length_immediate")
-				 (attr "length_address")))))))
+				 (plus (attr "length_address")
+                                       (attr "length_jcc_fuse"))))))))
 
 ;; The `memory' attribute is `none' if no memory is referenced, `load'
or
 ;; `store' if there is a simple memory reference therein, or `unknown'
@@ -14033,7 +14037,8 @@
   return "test{<imodesuffix>}\t%2, %2\n\t"
 	 "%+j%E1\t%l0\t" ASM_COMMENT_START " fused";
 }
-  [(set_attr "type" "multi")
+  [(set_attr "type" "icmp")
+   (set_attr "length_jcc_fuse" "2")
    (set_attr "mode" "<MODE>")])
 
 (define_insn "*jcc_fused_2"
@@ -14048,7 +14053,8 @@
   return "test{<imodesuffix>}\t%2, %2\n\t"
 	 "%+j%e1\t%l0\t" ASM_COMMENT_START " fused";
 }
-  [(set_attr "type" "multi")
+  [(set_attr "type" "icmp")
+   (set_attr "length_jcc_fuse" "2")
    (set_attr "mode" "<MODE>")])
 
 (define_insn "*jcc_fused_3"
@@ -14066,7 +14072,8 @@
   return "cmp{<imodesuffix>}\t{%3, %2|%2, %3}\n\t"
 	 "%+j%E1\t%l0\t" ASM_COMMENT_START " fused";
 }
-  [(set_attr "type" "multi")
+  [(set_attr "type" "icmp")
+   (set_attr "length_jcc_fuse" "2")
    (set_attr "mode" "<MODE>")])
 
 (define_insn "*jcc_fused_4"
@@ -14084,7 +14091,8 @@
   return "cmp{<imodesuffix>}\t{%3, %2|%2, %3}\n\t"
 	 "%+j%e1\t%l0\t" ASM_COMMENT_START " fused";
 }
-  [(set_attr "type" "multi")
+  [(set_attr "type" "icmp")
+   (set_attr "length_jcc_fuse" "2")
    (set_attr "mode" "<MODE>")])
 
 ;; In general it is not safe to assume too much about CCmode registers,


-----Original Message-----
From: H.J. Lu [mailto:hjl.tools@gmail.com] 
Sent: Friday, September 19, 2008 12:38 AM
To: Ye, Joey
Cc: GCC Patches; Uros Bizjak
Subject: Re: [Patch] Fix instruction length of jcc_fused

On Thu, Sep 18, 2008 at 9:03 AM, Ye, Joey <joey.ye@intel.com> wrote:

> @@ -645,7 +649,7 @@
>  (include "k6.md")
>  (include "athlon.md")
>  (include "geode.md")
> -;;(include "core2.md")
> +(include "core2.md")
>
>

I don't think this patch will work on trunk since there is no core2.md.


-- 
H.J.


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