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]

[patch] h8300.md: Define define_asm_attributes.


Hi,

Attached is a patch to define define_asm_attributes, "length" in
particular.

With this patch, many 16-bit offset branches in asm-intensive programs
like uClinux will collapse to 8-bit offset branch.

Tested on h8300 port with Roger's patch to optabs.c

Kazu Hirata

2003-10-09  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.md (define_asm_attributes): New.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.236
diff -u -r1.236 h8300.md
--- h8300.md	29 Sep 2003 16:34:09 -0000	1.236
+++ h8300.md	5 Oct 2003 17:00:05 -0000
@@ -101,6 +101,12 @@
 
 (define_attr "cc" "none,none_0hit,set_znv,set_zn,compare,clobber"
   (const_string "clobber"))
+
+;; Provide the maximum length of an assembly instruction in an asm
+;; statement.  The maximum length of 14 bytes is achieved on H8SX.
+
+(define_asm_attributes
+  [(set_attr "length" "14")])
 
 ;; ----------------------------------------------------------------------
 ;; MOVE INSTRUCTIONS


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