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] ARM/Thumb Avoid use of LR in Thumb code


This is really a work-around for a bug rather than a solution in itself.

In thumb code a branch of a very long distance has to be done using a BL 
instruction, but this has the nasty side-effect of clobbering the link 
register.  Since the branch instruction doesn't describe this side effect 
the compile can occasionally allocate r14 for use across such a branch 
(with disastrous consequences).  This patch is the brute-force solution to 
the problem:  Don't use R14 at all in Thumb code.

2003-10-31  Richard Earnshaw  <rearnsha@arm.com>

	PR target/7513
	* arm.h (CONDITIONAL_REGISTER_USAGE): Disable use of LR in Thumb
	code.


Attachment: thumb-lr.patch
Description: thumb-lr.patch


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