[PATCH] For the 16-bit unallocated NOP hints, make disassembly representation consistent with their 32-bit counterparts

Richard Barton richard.barton at arm.com
Fri Oct 18 02:52:49 PDT 2013


Hi Artyom

This patch looks fine, but two points:

 * The refactoring in ARMInstPrinter.cpp should go in a separate commit.
 * There need to be error tests for assembly with out of range immediates
for the hints. I think these are missing from the wide hints and the arm
hints too, so it would be great to add them here.

LGTM with those two changed made.

Regards,
Rich

> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Artyom Skrobov
> Sent: 17 October 2013 14:16
> To: llvm-commits at cs.uiuc.edu
> Subject: [PATCH] For the 16-bit unallocated NOP hints, make disassembly
> representation consistent with their 32-bit counterparts
> 
> Hello,
> 
> Recently the ARM and Thumb2 backends have been changed to give unallocated
> memory hints a disassembly form "hint #<immediate>", but the 16-bit
> unallocated hints have not been similarly changed.
> 
> The 32-bit hints with defined disassembly (NOP through to SEVL) are
> implemented as InstAliases to a top level MCInst called HINT (for ARM) or
> t2HINT (for Thumb2) that holds the "hint" disassembly notation. Thus for
ARM
> and Thumb2 "hint #4" can be used to mean "SEV", for example. However, the
> 16-bit Thumb hints are implemented as their own MCInsts, and the top level
> MCInst called T1SystemEncoding does not have a generic hint definition.
> 
> We've implemented a fairly simple change to bring Thumb1 in-line with
Thumb2
> and ARM support for hints. This also adds support for wide vs. narrow hint
> notation: assembling "hint #7" gives the 16-bit encoding, with "hint.w #7"
> required to get the 32-bit encoding. Although there's no pressing need for
this,
> as the UAL and ARMARM don't cover disassembly for these instructions, but
it
> makes the hints consistent with the rest of the instruction set.






More information about the llvm-commits mailing list