diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2018-10-09 11:29:45 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2018-10-09 11:29:45 +0000 |
commit | d465318c6d6faff43885378bdd7fc2b938b3dcbb (patch) | |
tree | 83935533b897fd120b5f3f07439c113aaa23d3df /llvm/lib/Target | |
parent | d1d2e45218b8db694299d572946ce2d6ad1fc614 (diff) | |
download | bcm5719-llvm-d465318c6d6faff43885378bdd7fc2b938b3dcbb.tar.gz bcm5719-llvm-d465318c6d6faff43885378bdd7fc2b938b3dcbb.zip |
[mips] Set pointer size to 4 bytes for N32 ABI
CodePointerSize and CalleeSaveStackSlotSize values are used in DWARF
generation. In case of MIPS it's incorrect to check for Triple::isMIPS64()
only this function returns true for N32 ABI too.
Now we do not have a method to recognize N32 if it's specified by a command
line option and is not a part of a target triple. So we check for
Triple::GNUABIN32 only. It's better than nothing.
Differential revision: https://reviews.llvm.org/D52874
llvm-svn: 344039
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp index 0a8d5677241..7bcda12051a 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp @@ -21,9 +21,8 @@ void MipsMCAsmInfo::anchor() { } MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) { IsLittleEndian = TheTriple.isLittleEndian(); - if (TheTriple.isMIPS64()) { + if (TheTriple.isMIPS64() && TheTriple.getEnvironment() != Triple::GNUABIN32) CodePointerSize = CalleeSaveStackSlotSize = 8; - } // FIXME: This condition isn't quite right but it's the best we can do until // this object can identify the ABI. It will misbehave when using O32 |