From: Dave.Martin@arm.com (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] arm64: Work around broken .inst when defective gas is detected
Date: Tue, 6 Dec 2016 17:38:54 +0000 [thread overview]
Message-ID: <20161206173853.GZ1574@e103592.cambridge.arm.com> (raw)
In-Reply-To: <20161206162826.GW1574@e103592.cambridge.arm.com>
On Tue, Dec 06, 2016 at 04:28:26PM +0000, Dave Martin wrote:
> On Tue, Dec 06, 2016 at 03:27:45PM +0000, Marc Zyngier wrote:
> > .inst being largely broken with older binutils, it'd be better not
> > to emit it altogether when detecting such configuration (as it
> > leads to all kind of horrors when using alternatives).
>
> GAS seems to provide few guarantees about the constantness of anything
> other than an expression composed purely of literal constants. So,
> this may rather be lack of a useful feature rather than a bug per se.
>
> > Generalize the __emit_inst macro and use it extensively in
> > asm/sysreg.h, and make it generate a .long when a broken gas is
> > detected. The disassembly will be crap, but at least we can write
> > semi-sane code.
>
> Don't know how much this helps, but if we want decent disassembly then
> one option is to use macros instead of symbols, so that the argument to
> .inst involves only literals after macro expansion.
[...]
It seems that this doesn't solve your problem though ... oh well.
Cheers
---Dave
next prev parent reply other threads:[~2016-12-06 17:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 15:27 [PATCH v2 0/2] arm64: Fix fallout of asm/opcodes.h removal Marc Zyngier
2016-12-06 15:27 ` [PATCH v2 1/2] arm64: Add detection code for broken .inst support in binutils Marc Zyngier
2016-12-06 15:27 ` [PATCH v2] arm/arm64: xen: Move shared architecture headers to include/xen/arm Marc Zyngier
2016-12-06 15:34 ` Marc Zyngier
2016-12-06 15:27 ` [PATCH v2 2/2] arm64: Work around broken .inst when defective gas is detected Marc Zyngier
2016-12-06 16:28 ` Dave Martin
2016-12-06 17:38 ` Dave Martin [this message]
2016-12-06 15:30 ` [PATCH v2 0/2] arm64: Fix fallout of asm/opcodes.h removal Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161206173853.GZ1574@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).