diff options
author | Huixiong Cao <qianshuijiaolong@126.com> | 2019-06-18 06:51:24 +0800 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2021-10-19 10:49:00 +0000 |
commit | eb7efec9349b39ef97bd79834434dbde06587290 (patch) | |
tree | ad5522b52c44a62f052fdfbce5353275f911533e | |
parent | df8b62c6fa80cc98ef5d8ad148a4921ccdda8661 (diff) |
Support MIPS 32 and 64 abi simultaneously for mips architecture
The original implementation only support MIPS 32. Extend it to
support MIPS 64 too.
Change-Id: Ibd11d93f448c87a5643d23014f07dcd9eb420544
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/abi.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index 10134096d9..7c61260b54 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -360,9 +360,11 @@ static Abis abiOf(const QByteArray &data) case 3: // EM_386 result.append(Abi(Abi::X86Architecture, os, flavor, Abi::ElfFormat, 32)); break; - case 8: // EM_MIPS - result.append(Abi(Abi::MipsArchitecture, os, flavor, Abi::ElfFormat, 32)); + case 8: { // EM_MIPS + const int width = getUint8(data, 4) == 2 ? 64 : 32; + result.append(Abi(Abi::MipsArchitecture, os, flavor, Abi::ElfFormat, width)); break; + } case 20: // EM_PPC result.append(Abi(Abi::PowerPCArchitecture, os, flavor, Abi::ElfFormat, 32)); break; |