1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

X86-Darwin: start emitting data-region directives for jump-tables.

The surrounding tools can cope these days, and they were invented for a reason.

llvm-svn: 268437
This commit is contained in:
Tim Northover 2016-05-03 21:03:41 +00:00
parent f99ddd26dc
commit 06b0388bac
3 changed files with 4 additions and 2 deletions

View 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);

View 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;

View 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