Skip to content

Commit

Permalink
[Mips] Fix type of 64-bit integer in case of MIPS N64 ABI
Browse files Browse the repository at this point in the history
Differential Revision: http://reviews.llvm.org/D7127

llvm-svn: 226877
  • Loading branch information
atanasyan committed Jan 22, 2015
1 parent 68ab023 commit 495523e
Show file tree
Hide file tree
Showing 3 changed files with 678 additions and 58 deletions.
6 changes: 6 additions & 0 deletions clang/lib/Basic/Targets.cpp
Expand Up @@ -5908,6 +5908,8 @@ class Mips32TargetInfoBase : public MipsTargetInfoBase {
: MipsTargetInfoBase(Triple, "o32", "mips32r2") {
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
Int64Type = SignedLongLong;
IntMaxType = Int64Type;
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
}
bool setABI(const std::string &Name) override {
Expand Down Expand Up @@ -6037,13 +6039,17 @@ class Mips64TargetInfoBase : public MipsTargetInfoBase {
PointerWidth = PointerAlign = 64;
SizeType = UnsignedLong;
PtrDiffType = SignedLong;
Int64Type = SignedLong;
IntMaxType = Int64Type;
}

void setN32ABITypes() {
LongWidth = LongAlign = 32;
PointerWidth = PointerAlign = 32;
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
Int64Type = SignedLongLong;
IntMaxType = Int64Type;
}

bool setABI(const std::string &Name) override {
Expand Down

0 comments on commit 495523e

Please sign in to comment.