[LLVMbugs] [Bug 20652] New: arm asm: .arch_extension toggles aren't right

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 13 13:17:14 PDT 2014


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

            Bug ID: 20652
           Summary: arm asm: .arch_extension toggles aren't right
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM assembly language parser
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

r214057 added this code:

+    bool ToggleFeatures = EnableFeature
+                              ? (~STI.getFeatureBits() & Extension.Features)
+                              : ( STI.getFeatureBits() & Extension.Features);
+    if (ToggleFeatures) {
+      unsigned Features =
+          ComputeAvailableFeatures(STI.ToggleFeature(Extension.Features));
+      setAvailableFeatures(Features);
+    }

If any bit needs to be toggled, it toggles all of them. That doesn't look
right.

I think this would be better:

+    unsigned ToggleFeatures = EnableFeature
+                              ? (~STI.getFeatureBits() & Extension.Features)
+                              : ( STI.getFeatureBits() & Extension.Features);
+    unsigned Features =
+        ComputeAvailableFeatures(STI.ToggleFeature(ToggleFeatures));
+    setAvailableFeatures(Features);

-- 
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/20140813/2748fffc/attachment.html>


More information about the llvm-bugs mailing list