This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem of inline assembly for branch instruction
- From: Ian Lance Taylor <iant at google dot com>
- To: "Naveen H. S" <Naveen dot S at kpitcummins dot com>
- Cc: "gcc-help\ at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 07 Sep 2011 09:24:11 -0700
- Subject: Re: Problem of inline assembly for branch instruction
- References: <5CD0E437A05A514A90A1B12527F331540E4182@KCHJEXMB02.kpit.com>
"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