[LLVMbugs] [Bug 14780] New: Thumb2: CBZ and CBNZ have to use zero-extend

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 2 04:08:50 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=14780

             Bug #: 14780
           Summary: Thumb2: CBZ and CBNZ have to use zero-extend
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: koviankevin at hotmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


~$ echo '0x013 0xbb' | ~/llvm/llvm-svn/llvm/Debug+Asserts/bin/llvm-mc 
-disassemble -arch=thumb -mattr=+v7
    .section    __TEXT,__text,regular,pure_instructions
    cbnz    r3, #-60
(the immediate value must be 68)

according to ARM's reference manual, imm32 = ZeroExtend(i:imm5:'0', 32);
the immediate value can't be negative

I think the integer-extending stratgy in DecodeThumbCmpBROperand in
lib/Target/ARM/Disassembler/ARMDisassembler.cpp must be zero-extend, not
sign-extend.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list