diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2019-11-13 12:08:38 +0300 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2019-11-13 13:32:39 +0300 |
commit | 068db2ed4d1879e100fb12f2a3d75e38b8867b46 (patch) | |
tree | 4eb7a0caba5fe7a57010141f0a4c2e5e83b44585 /llvm/lib/Target/Mips/MipsSubtarget.cpp | |
parent | b3853d852629d1a2713cf47a2422c46c0c630f87 (diff) | |
download | bcm5719-llvm-068db2ed4d1879e100fb12f2a3d75e38b8867b46.tar.gz bcm5719-llvm-068db2ed4d1879e100fb12f2a3d75e38b8867b46.zip |
[mips] Show an error if 64-bit target triple provided with 32-bit CPU
When a 64-bit triple is used emit an error if the CPU only supports
32-bit code.
Patch by Miloš Stojanović.
Differential Revision: https://reviews.llvm.org/D70018
Diffstat (limited to 'llvm/lib/Target/Mips/MipsSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsSubtarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 29e557c6052..133b818114c 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -256,6 +256,10 @@ MipsSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS, stackAlignment = Align(8); } + if ((isABI_N32() || isABI_N64()) && !isGP64bit()) + report_fatal_error("64-bit code requested on a subtarget that doesn't " + "support it!"); + return *this; } |