From 5b34a189e1b842d7b82ad3f63ab8aed2a2cfa4b4 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Mon, 24 Nov 2014 21:37:42 +0000 Subject: [PATCH] Merging r221408: ------------------------------------------------------------------------ r221408 | petarj | 2014-11-05 22:42:31 +0000 (Wed, 05 Nov 2014) | 9 lines [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/branches/release_35@222692 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCObjectFileInfo.cpp | 2 ++ test/CodeGen/Mips/ehframe-indirect.ll | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index d490ef30b69..aeb92991b3d 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -340,6 +340,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { break; case Triple::mips: case Triple::mipsel: + case Triple::mips64: + case Triple::mips64el: // MIPS uses indirect pointer to refer personality functions, so that the // eh_frame section can be read-only. DW.ref.personality will be generated // for relocation. diff --git a/test/CodeGen/Mips/ehframe-indirect.ll b/test/CodeGen/Mips/ehframe-indirect.ll index e78497a9521..b4efb40b642 100644 --- a/test/CodeGen/Mips/ehframe-indirect.ll +++ b/test/CodeGen/Mips/ehframe-indirect.ll @@ -1,5 +1,7 @@ -; RUN: llc -mtriple=mipsel-linux-gnu < %s | FileCheck %s -; RUN: llc -mtriple=mipsel-linux-android < %s | FileCheck %s +; RUN: llc -mtriple=mipsel-linux-gnu < %s | FileCheck -check-prefix=CHECK32 %s +; RUN: llc -mtriple=mipsel-linux-android < %s | FileCheck -check-prefix=CHECK32 %s +; RUN: llc -mtriple=mips64el-linux-gnu < %s | FileCheck -check-prefix=CHECK64 %s +; RUN: llc -mtriple=mips64el-linux-android < %s | FileCheck -check-prefix=CHECK64 %s define i32 @main() { ; CHECK: .cfi_startproc @@ -27,8 +29,11 @@ declare void @foo() ; CHECK: .hidden DW.ref.__gxx_personality_v0 ; CHECK: .weak DW.ref.__gxx_personality_v0 ; CHECK: .section .data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat -; CHECK: .align 2 +; CHECK32: .align 2 +; CHECK64: .align 3 ; CHECK: .type DW.ref.__gxx_personality_v0,@object -; CHECK: .size DW.ref.__gxx_personality_v0, 4 +; CHECK32: .size DW.ref.__gxx_personality_v0, 4 +; CHECK64: .size DW.ref.__gxx_personality_v0, 8 ; CHECK: DW.ref.__gxx_personality_v0: -; CHECK: .4byte __gxx_personality_v0 +; CHECK32: .4byte __gxx_personality_v0 +; CHECK64: .8byte __gxx_personality_v0