This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] |
Hi, In stage1 of a bootstrap of GCC in Thumb2 state, I came across a problem with unconditional calls going out of range in Thumb2. This was because the assembler ends up with encoding a bl within the function with the Thumb1 bl instruction rather than the Thumb2 instruction. With some help from Richard, I've now fixed this with the attached patch. This refactors some of the code from md_apply_fix into a separate function of its own and rewrites some of the masking code in a form more friendly to immediate generation on the ARM. Tested cross on arm-eabi with no regressions. Ok to commit on trunk and backport to the 2.20 branch ? cheers Ramana 2009-12-21 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> Richard Earnshaw <richard.earnshaw@arm.com> * config/tc-arm.c (encode_thumb2_b_bl_offset): New. Refactored from md_apply_fix. (md_apply_fix): Fixup range checks for Thumb2 version of unconditional calls. Call encode_thumb2_b_bl_offset for unconditional branches / function calls.
Attachment:
fix-b-bl-encoding-patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |