]> granicus.if.org Git - llvm/commitdiff
X86-Darwin: start emitting data-region directives for jump-tables.
authorTim Northover <tnorthover@apple.com>
Tue, 3 May 2016 21:03:41 +0000 (21:03 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 3 May 2016 21:03:41 +0000 (21:03 +0000)
The surrounding tools can cope these days, and they were invented for a reason.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268437 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
test/CodeGen/X86/global-sections.ll
test/CodeGen/X86/pic_jumptable.ll

index f5bdd2d4b7ea1d7380b7d079846d365c98847927..e6fdf57ed183091181230fb22cb30bc1841b7c63 100644 (file)
@@ -39,7 +39,7 @@ RelaxELFRel("relax-relocations", cl::init(false),
   cl::desc("Emit R_X86_64_GOTPCRELX instead of R_X86_64_GOTPCREL"));
 
 static cl::opt<bool>
-MarkedJTDataRegions("mark-data-regions", cl::init(false),
+MarkedJTDataRegions("mark-data-regions", cl::init(true),
   cl::desc("Mark code section jump table data regions."),
   cl::Hidden);
 
index 1401218da5f848ce010757ab145bf7f127027636..ef1b1ac752435c724a95fd5d44bb6c306539d86e 100644 (file)
@@ -93,11 +93,13 @@ bb7:
 ; DARWIN64: Lfunc_end
 ; DARWIN64-NEXT: .cfi_endproc
 ; DARWIN64-NOT: .section
+; DARWIN64: .data_region jt32
 ; DARWIN64: LJTI{{.*}}:
 ; DARWIN64-NEXT: .long
 ; DARWIN64-NEXT: .long
 ; DARWIN64-NEXT: .long
 ; DARWIN64-NEXT: .long
+; DARWIN64-NEXT: .end_data_region
 ; DARWIN64-NEXT: .section        __TEXT,__gcc_except_tab
 
 ; int G1;
index 8c1992a24ece5ef4672e4eaf2773f37b095ceb15..444f98ef83de65855908d85747d9b061bccf6556 100644 (file)
@@ -3,7 +3,7 @@
 ; RUN: llc < %s -relocation-model=pic -mark-data-regions -mtriple=i686-apple-darwin -asm-verbose=false \
 ; RUN:   | FileCheck %s --check-prefix=CHECK-DATA
 ; RUN: llc < %s -relocation-model=pic -mtriple=i686-apple-darwin -asm-verbose=false \
-; RUN:   | FileCheck %s
+; RUN:   | FileCheck %s --check-prefix=CHECK-DATA
 ; RUN: llc < %s                       -mtriple=x86_64-apple-darwin | not grep 'lJTI'
 ; rdar://6971437
 ; rdar://7738756