Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 5940390

Browse files
[mips64] Fix MIPS64 exception personality encoding
Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame. The MIPS64 follow-up of the MIPS32 fix (rL209907). Patch by Vladimir Stefanovic. Differential Revision: http://reviews.llvm.org/D6141 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221408 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 3f1d66f commit 5940390

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

lib/MC/MCObjectFileInfo.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
338338
break;
339339
case Triple::mips:
340340
case Triple::mipsel:
341+
case Triple::mips64:
342+
case Triple::mips64el:
341343
// MIPS uses indirect pointer to refer personality functions, so that the
342344
// eh_frame section can be read-only. DW.ref.personality will be generated
343345
// for relocation.

test/CodeGen/Mips/ehframe-indirect.ll

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
; RUN: llc -mtriple=mipsel-linux-gnu < %s | FileCheck %s
2-
; RUN: llc -mtriple=mipsel-linux-android < %s | FileCheck %s
1+
; RUN: llc -mtriple=mipsel-linux-gnu < %s | FileCheck -check-prefix=CHECK32 %s
2+
; RUN: llc -mtriple=mipsel-linux-android < %s | FileCheck -check-prefix=CHECK32 %s
3+
; RUN: llc -mtriple=mips64el-linux-gnu < %s | FileCheck -check-prefix=CHECK64 %s
4+
; RUN: llc -mtriple=mips64el-linux-android < %s | FileCheck -check-prefix=CHECK64 %s
35

46
define i32 @main() {
57
; CHECK: .cfi_startproc
@@ -27,8 +29,11 @@ declare void @foo()
2729
; CHECK: .hidden DW.ref.__gxx_personality_v0
2830
; CHECK: .weak DW.ref.__gxx_personality_v0
2931
; CHECK: .section .data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat
30-
; CHECK: .align 2
32+
; CHECK32: .align 2
33+
; CHECK64: .align 3
3134
; CHECK: .type DW.ref.__gxx_personality_v0,@object
32-
; CHECK: .size DW.ref.__gxx_personality_v0, 4
35+
; CHECK32: .size DW.ref.__gxx_personality_v0, 4
36+
; CHECK64: .size DW.ref.__gxx_personality_v0, 8
3337
; CHECK: DW.ref.__gxx_personality_v0:
34-
; CHECK: .4byte __gxx_personality_v0
38+
; CHECK32: .4byte __gxx_personality_v0
39+
; CHECK64: .8byte __gxx_personality_v0

0 commit comments

Comments
 (0)