From 3464cec4d8cf09f9e1b3b9af9ab7b7d4a6a69a59 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 23 Aug 2010 04:45:37 +0000 Subject: [PATCH] Workaround broken jump tables on x86-64 COFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111792 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCAsmInfoCOFF.cpp | 1 + lib/Target/X86/X86ISelLowering.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/MC/MCAsmInfoCOFF.cpp b/lib/MC/MCAsmInfoCOFF.cpp index 7fc7d7abb23..45e981b9fcb 100644 --- a/lib/MC/MCAsmInfoCOFF.cpp +++ b/lib/MC/MCAsmInfoCOFF.cpp @@ -20,6 +20,7 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() { GlobalPrefix = "_"; COMMDirectiveAlignmentIsInBytes = false; HasLCOMMDirective = true; + HasSetDirective = false; HasDotTypeDotSizeDirective = false; HasSingleParameterDotFile = false; PrivateGlobalPrefix = "L"; // Prefix for private global symbols diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a2e2806c2e6..9b0c5297e44 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -1029,6 +1029,12 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM) maxStoresPerMemmove = 3; // For @llvm.memmove -> sequence of stores setPrefLoopAlignment(16); benefitFromCodePlacementOpt = true; + + // FIXME: Jump tables are currently broken for 64 bit COFF. + // See PR7960. + if (Subtarget->is64Bit() && Subtarget->isTargetCOFF()) { + DisableJumpTables = true; + } }