summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2014-01-29 04:51:35 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2014-01-29 04:51:35 +0000
commit771023dbcb5dbf2e967f064021ecf0d8e8acf6de (patch)
tree4ee9dfe5f873161fca7fdd180055ad61b46406cb /test
parent6a67a3f3ec5c70c3a9473068fe20c97c612d9780 (diff)
downloadllvm-771023dbcb5dbf2e967f064021ecf0d8e8acf6de.tar.gz
llvm-771023dbcb5dbf2e967f064021ecf0d8e8acf6de.tar.bz2
llvm-771023dbcb5dbf2e967f064021ecf0d8e8acf6de.tar.xz
[Sparc] Use %r_disp32 for pc_rel entries in gcc_except_table and eh_frame.
Otherwise, assembler (gas) fails to assemble them with error message "operation combines symbols in different segments". This is because MC computes pc_rel entries with subtract expression between labels from different sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/SPARC/exception.ll29
1 files changed, 27 insertions, 2 deletions
diff --git a/test/CodeGen/SPARC/exception.ll b/test/CodeGen/SPARC/exception.ll
index edc9d59e56..d6044e199f 100644
--- a/test/CodeGen/SPARC/exception.ll
+++ b/test/CodeGen/SPARC/exception.ll
@@ -1,7 +1,9 @@
; RUN: llc < %s -march=sparc -relocation-model=static | FileCheck -check-prefix=V8ABS %s
; RUN: llc < %s -march=sparc -relocation-model=pic | FileCheck -check-prefix=V8PIC %s
+; RUN: llc < %s -march=sparc -relocation-model=pic -disable-cfi | FileCheck -check-prefix=V8PIC_NOCFI %s
; RUN: llc < %s -march=sparcv9 -relocation-model=static | FileCheck -check-prefix=V9ABS %s
; RUN: llc < %s -march=sparcv9 -relocation-model=pic | FileCheck -check-prefix=V9PIC %s
+; RUN: llc < %s -march=sparcv9 -relocation-model=pic -disable-cfi | FileCheck -check-prefix=V9PIC_NOCFI %s
%struct.__fundamental_type_info_pseudo = type { %struct.__type_info_pseudo }
@@ -40,11 +42,23 @@
; V8PIC: .cfi_register 15, 31
; V8PIC: .section .gcc_except_table
; V8PIC-NOT: .section
-; V8PIC: .word .L_ZTIi.DW.stub-
+; V8PIC: .word %r_disp32(.L_ZTIi.DW.stub)
; V8PIC: .data
; V8PIC: .L_ZTIi.DW.stub:
; V8PIC-NEXT: .word _ZTIi
+; V8PIC_NOCFI-LABEL: main:
+; V8PIC_NOCFI: .section .gcc_except_table
+; V8PIC_NOCFI-NOT: .section
+; V8PIC_NOCFI: .word %r_disp32(.L_ZTIi.DW.stub)
+; V8PIC_NOCFI: .data
+; V8PIC_NOCFI: .L_ZTIi.DW.stub:
+; V8PIC_NOCFI-NEXT: .word _ZTIi
+; V8PIC_NOCFI: .section .eh_frame
+; V8PIC_NOCFI-NOT: .section
+; V8PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
+
+
; V9ABS-LABEL: main:
; V9ABS: .cfi_startproc
; V9ABS: .cfi_personality 0, __gxx_personality_v0
@@ -65,11 +79,22 @@
; V9PIC: .cfi_register 15, 31
; V9PIC: .section .gcc_except_table
; V9PIC-NOT: .section
-; V9PIC: .word .L_ZTIi.DW.stub-
+; V9PIC: .word %r_disp32(.L_ZTIi.DW.stub)
; V9PIC: .data
; V9PIC: .L_ZTIi.DW.stub:
; V9PIC-NEXT: .xword _ZTIi
+; V9PIC_NOCFI-LABEL: main:
+; V9PIC_NOCFI: .section .gcc_except_table
+; V9PIC_NOCFI-NOT: .section
+; V9PIC_NOCFI: .word %r_disp32(.L_ZTIi.DW.stub)
+; V9PIC_NOCFI: .data
+; V9PIC_NOCFI: .L_ZTIi.DW.stub:
+; V9PIC_NOCFI-NEXT: .xword _ZTIi
+; V9PIC_NOCFI: .section .eh_frame
+; V9PIC_NOCFI-NOT: .section
+; V9PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
+
define i32 @main(i32 %argc, i8** nocapture readnone %argv) unnamed_addr #0 {
entry:
%0 = icmp eq i32 %argc, 2