omjavaid created this revision.
omjavaid added reviewers: tberghammer, labath.
omjavaid added a subscriber: lldb-commits.
Herald added subscribers: rengolin, aemerson.

rL267291 introduces a lot of regression on arm-linux by fixing module 
architecture to thumb if it finds thumb32 tag set.

Tag_THUMB_ISA_use, (=9), uleb128
2 32-bit Thumb instructions were permitted (implies 16-bit instructions 
permitted)

Does not mean that there wont be any arm instruction in current module. 
Therefore we can not set the architecture to thumb without knowing the value of

Tag_ARM_ISA_use, (=8), uleb128
0 The user did not permit this entity to use ARM instructions
1 The user intended that this entity could use ARM instructions

For most cases Tag_ARM_ISA_use, (=8), uleb128 will be set to 1 that will force 
us to use arm as our architecture instead of thumb.

I am removing this code for now may be we can come up with a better solution to 
get it over with.

http://reviews.llvm.org/D19520

Files:
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1564,19 +1564,6 @@
 
                     break;
 
-                case llvm::ARMBuildAttrs::THUMB_ISA_use:
-                {
-                    uint64_t ThumbISA = data.GetULEB128(&Offset);
-
-                    // NOTE: ignore ThumbISA == 
llvm::ARMBuildAttrs::AllowThumbDerived
-                    // since that derives it based on the architecutre/profile
-                    if (ThumbISA == llvm::ARMBuildAttrs::AllowThumb32)
-                        if (arch_spec.GetTriple().getArch() == 
llvm::Triple::UnknownArch ||
-                            arch_spec.GetTriple().getArch() == 
llvm::Triple::arm)
-                            arch_spec.GetTriple().setArch(llvm::Triple::thumb);
-
-                    break;
-                }
                 case llvm::ARMBuildAttrs::ABI_VFP_args:
                 {
                     uint64_t VFPArgs = data.GetULEB128(&Offset);


Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1564,19 +1564,6 @@
 
                     break;
 
-                case llvm::ARMBuildAttrs::THUMB_ISA_use:
-                {
-                    uint64_t ThumbISA = data.GetULEB128(&Offset);
-
-                    // NOTE: ignore ThumbISA == llvm::ARMBuildAttrs::AllowThumbDerived
-                    // since that derives it based on the architecutre/profile
-                    if (ThumbISA == llvm::ARMBuildAttrs::AllowThumb32)
-                        if (arch_spec.GetTriple().getArch() == llvm::Triple::UnknownArch ||
-                            arch_spec.GetTriple().getArch() == llvm::Triple::arm)
-                            arch_spec.GetTriple().setArch(llvm::Triple::thumb);
-
-                    break;
-                }
                 case llvm::ARMBuildAttrs::ABI_VFP_args:
                 {
                     uint64_t VFPArgs = data.GetULEB128(&Offset);
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to