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: Thumb: prevent extraneous jumps around constant tables


> 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.



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