This is the mail archive of the gcc-help@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: Problem of inline assembly for branch instruction


"Naveen H. S" <Naveen.S@kpitcummins.com> 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


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