From 38899fc4dae3ca02777dc27f23ee5b313a68b209 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Thu, 27 Mar 2014 12:49:34 +0000 Subject: [PATCH] [mips] The decision between GOT_DISP and GOT16 for global addresses depends on ABI rather than MIPS64 Summary: No functional change (for supported use cases) Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3191 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204922 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 5f2c8e05a24..13de7e3a577 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -1523,8 +1523,8 @@ SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op, MipsII::MO_GOT_LO16, DAG.getEntryNode(), MachinePointerInfo::getGOT()); - return getAddrGlobal(N, Ty, DAG, - hasMips64() ? MipsII::MO_GOT_DISP : MipsII::MO_GOT16, + return getAddrGlobal(N, Ty, DAG, (isN32() || isN64()) ? MipsII::MO_GOT_DISP + : MipsII::MO_GOT16, DAG.getEntryNode(), MachinePointerInfo::getGOT()); }