[PATCH v3 12/11] Fix incorrect encoding of relaxed instructions (PR18303)

David Woodhouse dwmw2 at infradead.org
Mon Jan 6 13:02:12 PST 2014


On Mon, 2014-01-06 at 12:24 -0800, Jim Grosbach wrote:
> I like, in general, the approach of attaching the feature bits to a
> fragment rather than the instruction itself, which seems like
> significant overkill since they will almost always (especially for
> compiler generated code) all be the same.
> 
> -Jim
> 
> cc greg and david since they’re looking at some (semi) related issues
> in the ARM backend.

The clean, current version of this patch is at
http://git.infradead.org/users/dwmw2/llvm.git/commitdiff/87ed55e05 and
the X86-specific part is mostly in the previous patch in that tree.

I took a brief look at  the ARM code emitter, and it looks like the same
approach should work there fairly easily. Just propagate the Features
argument handed to EncodeInstruction(), instead of using
STI.getFeatureBits() in your isThumb() &c functions.

And provide a getAvailableFeatures() which returns STI.getFeatureBits()
of course.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140106/3d5925df/attachment.bin>


More information about the llvm-commits mailing list