Thumb: prevent extraneous jumps around constant tables

Richard Earnshaw rearnsha@arm.com
Thu Feb 10 02:14:00 GMT 2000


> Hi Richard,
> 
> : There's something wrong here.  The code should not be emitting a jump 
> : instruction after any barrier.  There should be a barrier after the 
> : epilogue, so why does the normal case not handle the epilogue condition 
> : (it used to)?  Are we emitting jump instructions after all barriers?
> 
> I have now tracked down what was really going wrong.  The Thumb
> epilogue marker was being emitted with emit_insn() instead of
> emit_jump_insn(), so find_barrier() was not realising that it was a
> jump.  (No barrier is needed, just a jump insn).
> 

I wondered if it might be something like that.  Unconditional jumps will 
have a barrier added automatically.

> In the course of developing a patch to fix this I also found that flow
> would get confused because the epilogue did not contain a (return)
> RTX, so I have also added this.
> 
> What do you think of the patch below ?

OK.  Do we need something similar for the branch, or does that version do 
the epilogue differently.

> 2000-02-09  Nick Clifton  <nickc@cygnus.com>
> 
> 	* config/arm/thumb.md (epilogue): Include a (return) in the
> 	generated insn, and emit it using emit_jump_insn not
> 	emit_insn.




More information about the Gcc-patches mailing list