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]

Re: [PATCH][ARM] Fix RVCT interoperation issue


On 09/03/11 16:12, Ramana Radhakrishnan wrote:
On Fri, 2011-03-04 at 11:23 +0000, Andrew Stubbs wrote:
The attached patch, submitted on behalf of Dan Jacobowitz, fixes an
unwind bug when using RealView and libgcc.

It's an old patch that has been in CodeSourcery and Linaro toolchains
for sometime, but somehow escaped being posted here.

I would like to see some context around this patch before accepting or rejecting this, maybe a testcase (agreed that this is harder) or a description of the problem this patch is attempting to fix.

A testcase would be difficult. GCC won't produce anything that will exercise this code. We'd have to cook something up in hand-coded assembler, or maybe import something from RVCT - I don't know.


However, the logic can easily be compared with the ARM EHABI document, section 9.2:

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf

The key sentences are:

 "If the high bit is set in the word containing N, then the type_info
  list is followed by a prel31 landing pad offset (with bit 31 clear)
  to be entered in the event that no type matches the thrown type. High
  bit clear in the N word signifies that implicitly the no match case
  should result in a call to __cxa_call_unexpected. When the high bit
  clear format is used, object producers must emit an R_ARM_NONE
  relocation to __cxa_call_unexpected to indicate the dependency to the
  linker."

(Thanks to Paul Brook for explaining this to me. :)

Andrew


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