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

             Bug #: 12696
           Summary: Attribute bits above 1<<30 are not encoded in bitcode
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 8471
  --> http://llvm.org/bugs/attachment.cgi?id=8471
Patch the encode all ttributes bits in the bitcode

Hi,

define void @f() nonlazybind uwtable
{
        ret void;
}

In this trivial example I've uwtable is encoded as (1<<30) while nonlazybind is
(1<<31). When assembling using llvm-as and disassembling using llvm-dis the
code becomes.

define void @f() uwtable {
  ret void
}

I think the culprit is
lib/Bitcode/Writer/BitcodeWriter.cpp:186

FauxAttr |= (PAWI.Attrs.Raw() & (0x3FFull << 21)) << 11;

I'm attaching a quick fix

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to