[PATCH] NEON instructions were erroneously decoded from certain invalid encodings

Artyom Skrobov Artyom.Skrobov at arm.com
Wed Oct 30 08:25:35 PDT 2013


Hello,

We have found that certain invalid encodings were erroneously decoded as NEON/Crypto instructions.
ThumbDisassembler::getInstruction didn't validate that an instruction's bits 26:27 are 11, before resetting them to 00 to match an ARM NEON encoding.

As an example:
==========
$ echo 0x00 0xfc 0x40 0x0c | llvm-mc -disassemble -triple thumbv8 -show-encoding
                .text
                sha256h.32         q0, q0, q0      @ encoding: [0x00,0xff,0x40,0x0c]
==========
Here, [0x00 0xfc 0x40 0x0c] has been decoded into an MCInst whose encoding is [0x00,0xff,0x40,0x0c].

OK to commit this fix?

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131030/793851b2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: neon-encodings.patch
Type: application/octet-stream
Size: 2951 bytes
Desc: neon-encodings.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131030/793851b2/attachment.obj>


More information about the llvm-commits mailing list