Revert r129518, "Change ELF systems to use CFI for producing the EH tables. This reduces the"

It broke several builds.

llvm-svn: 129557
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 7eeec5d..5d34c7d 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -314,7 +314,7 @@
                          MCStreamer &Streamer) const {
   const MCExpr *Res = MCSymbolRefExpr::Create(Sym, getContext());
 
-  switch (Encoding & 0x70) {
+  switch (Encoding & 0xF0) {
   default:
     report_fatal_error("We do not support this DWARF encoding yet!");
   case dwarf::DW_EH_PE_absptr:
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 52ea6a8..071fbe0 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -22,7 +22,6 @@
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/MC/MCAsmInfo.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Support/CommandLine.h"
@@ -477,15 +476,6 @@
         .addReg(StackPtr);
 
     if (needsFrameMoves) {
-      const MCAsmInfo &MAI = MMI.getContext().getAsmInfo();
-      if (MAI.getExceptionHandlingType() == ExceptionHandling::DwarfCFI) {
-        MCSymbol *FrameLabel0 = MMI.getContext().CreateTempSymbol();
-        BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel0);
-        MachineLocation FPSrc0(FramePtr);
-        MachineLocation FPDst0(FramePtr, -2 * stackGrowth);
-        Moves.push_back(MachineMove(FrameLabel0, FPDst0, FPSrc0));
-      }
-
       // Mark effective beginning of when frame pointer becomes valid.
       MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
       BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel);
@@ -625,7 +615,7 @@
     emitSPUpdate(MBB, MBBI, StackPtr, -(int64_t)NumBytes, Is64Bit,
                  TII, *RegInfo);
 
-  if (( (!HasFP && NumBytes) || PushedRegs) && needsFrameMoves) {
+  if ((NumBytes || PushedRegs) && needsFrameMoves) {
     // Mark end of stack pointer adjustment.
     MCSymbol *Label = MMI.getContext().CreateTempSymbol();
     BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(Label);
diff --git a/llvm/lib/Target/X86/X86MCAsmInfo.cpp b/llvm/lib/Target/X86/X86MCAsmInfo.cpp
index 62951897..6686214 100644
--- a/llvm/lib/Target/X86/X86MCAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86MCAsmInfo.cpp
@@ -89,9 +89,7 @@
   SupportsDebugInformation = true;
 
   // Exceptions handling
-  ExceptionsType = ExceptionHandling::DwarfCFI;
-
-  DwarfRequiresFrameSection = false;
+  ExceptionsType = ExceptionHandling::DwarfTable;
 
   // OpenBSD has buggy support for .quad in 32-bit mode, just split into two
   // .words.