[llvm-bugs] [Bug 26624] New: [AArch64] Decoder adrp comment incorrect

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 15 11:42:46 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26624

            Bug ID: 26624
           Summary: [AArch64] Decoder adrp comment incorrect
           Product: tools
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: TableGen
          Assignee: unassignedbugs at nondot.org
          Reporter: njholcomb at wi.rr.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The decoder produces inaccurate comments when decoding the adrp instruction in
AArch64. Specifically, it incorrectly masks an immediate value instead of
shifting. The semantics of the adrp instruction require that the 21-bit
immediate value be shifted left by 12 bits to identify a page; however, the
comment written with the adrp instruction instead masks the bottom 12 bits.
Below is an example with the result from libopcodes as well.

Raw Bytes:
6c 7b 51 d0

LLVM decoding:
adrp x12, 667502 // 0xa2000

libopcodes decoding:
adrp x12, 0x00000000a2f6e000

The LLVM encoding has the correct constant value, but the comment about the
constant is incorrect.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160215/aaa97801/attachment.html>


More information about the llvm-bugs mailing list