[all-commits] [llvm/llvm-project] 302a16: [MIPS] Fix switching between 32/64-bit variants of...
YunQiang Su via All-commits
all-commits at lists.llvm.org
Thu Oct 21 05:04:32 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 302a165e18fda8318e9e1ce6f452a48925cb3857
https://github.com/llvm/llvm-project/commit/302a165e18fda8318e9e1ce6f452a48925cb3857
Author: YunQiang Su <wzssyqa at gmail.com>
Date: 2021-10-21 (Thu, 21 Oct 2021)
Changed paths:
M llvm/include/llvm/ADT/Triple.h
M llvm/lib/Support/Triple.cpp
M llvm/unittests/ADT/TripleTest.cpp
Log Message:
-----------
[MIPS] Fix switching between 32/64-bit variants of r6 target triples
If clang driver gets 64-bit r6 target triple like `mipsisa64r6` and
additional option forces switching to generation of 32-bit code, it
loses r6 abi and generates 32-bit r2-r5 abi code.
```
$ clang -target mipsisa64r6-linux-gnu -mabi=32
```
This patch fixes the problem.
- Add optional `SubArchType` argument to the `Triple::setArch()` method.
- Implement generation of mips r6 target triples in the
`Triple::getArchName()` method.
Differential Revision: https://reviews.llvm.org/D110514.diff
More information about the All-commits
mailing list