This is the mail archive of the 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] H8/300 : Avoid the insertion of divu.l instruction in the delay slot for H8/SX targets


According to the datasheet of H8/SX target, the instruction to be 
placed in the delay slot should be of 1 word size. Still the divu.l
instruction which occupy 4 bytes (2 words) goes into delay slot. 

Executable containing divu.l instruction in the delay slot can be 
debugged successfully in H8300-elf GDB. However this is unexpected
because the same executable hangs on the hardware board at the point
of divu.l instruction execution.

Following patch prohibits the insertion of the divu.l instruction
in the delay slot for Renesas H8/SX targets.

No new regressions found.


2007-07-09 Deepen Mantri <>

	* Added the "can_delay" attribute in define insn
	            of divu.l instruction. 

--- ./gcc/config/h8300/	2007-07-06 17:12:54.000000000
+++ ./gcc/config/h8300/	2007-07-06 17:13:31.000000000 +0530
@@ -1636,7 +1636,8 @@
 	 (match_operand:SI 2 "reg_or_nibble_operand" "r IP4>X")))]
-  [(set_attr "length" "2")])
+  [(set_attr "length" "2")
+   (set_attr "can_delay" "no")])
 (define_insn "divsi3"
   [(set (match_operand:SI 0 "register_operand" "=r")


Deepen Mantri		

KPIT Cummins InfoSystems Ltd.		
Pune, India		

Free download of GNU based tool-chains for Renesas' SH, H8, R8C, 
M16C and M32C Series. The following site also offers free technical
support to its users. Visit for details.
Latest versions of KPIT GNU tools were released on June 1,2007	

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