[llvm-commits] [PATCH]Fix the LLVM v7 assembler and instruction printer for 8-bit immediate offset addressing

Silviu Baranga silbar01 at arm.com
Thu May 10 09:26:19 PDT 2012


Hi,

 

The assembler and instruction printer do not handle correctly the cases
where the immediate is #-0 for

the 8-bit immediate offset addressing on ARM v7 (e.g. [r1, #-0]). Currently
an instruction using this type 

of operand will be assembled as undefined. This is because the assembler
encodes #-0 as INT_MIN,

which is not handled by the check in the isAddrMode3() function.

 

When printed, the addressing operand should have the #-0 included instead of
being ignored (e.g. should

be [r1,#-0] instead of [r1]) because the instruction encoding is different
for #-0 and #0.

 

The patch fixes these issues and adds a regression test.

 

Please review this patch.

 

Thanks,

Silviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120510/18ad9f30/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: negz.diff
Type: application/octet-stream
Size: 1848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120510/18ad9f30/attachment.obj>


More information about the llvm-commits mailing list