Hi, >> See define_asm_attributes for a way to estimate the length of an inline >> asm instruction. Modifying the define_asm_attributes to maximum possible length of a single machine instruction solved the issue. Thanks very much for the suggestion. Thanks & Regards, Naveen -----Original Message----- From: Ian Lance Taylor [mailto:iant@xxxxxxxxxx] Sent: Wednesday, September 07, 2011 9:54 PM To: Naveen H. S Cc: gcc-help@xxxxxxxxxxx Subject: Re: Problem of inline assembly for branch instruction "Naveen H. S" <Naveen.S@xxxxxxxxxxxxxxx> writes: > The branch instruction has been implemented and working as expected. > However, it resulted in error while testing an application with inline > assembly. In the application, the linker calculated length of offset > from current location to the branch as 24. However, due to some inline > assembly in between PC and branch location, the offset is more than 32. > Hence, the linker generates error while linking application. See define_asm_attributes for a way to estimate the length of an inline asm instruction. In the worst case, you can use this to make every inline asm large enough to force the use of a long branch. Ian