Thread (8 messages) 8 messages, 3 authors, 2016-12-06

[PATCH v2 2/2] arm64: Work around broken .inst when defective gas is detected

flat view
DORMANTno replies

From: Dave.Martin@arm.com (Dave Martin)
Date: 2016-12-06 17:38:54

Revision v2 of 3 in this series.

Revisions (3)
  1. v2
  2. v2
  3. v2 current
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:
quoted
.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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help