6 Commits

Author SHA1 Message Date
Wang Rui
06cdc6f9ce [LoongArch] Ignore warnings when there is no environment in triple
In Rust bare-metal targets, there is no environment component in triple name. This patch ignores warnings that look like:

```
warning: triple-implied ABI conflicts with provided target-abi ‘lp64s', using target-abi
```

Reviewed By: SixWeining, xen0n

Differential Revision: https://reviews.llvm.org/D152778
2023-06-14 13:23:54 +08:00
wanglei
da44a9b0fa [LoongArch] Add some comments to getBPReg. NFC 2023-05-08 11:40:50 +08:00
Archibald Elliott
62c7f035b4 [NFC][TargetParser] Remove llvm/ADT/Triple.h
I also ran `git clang-format` to get the headers in the right order for
the new location, which has changed the order of other headers in two
files.
2023-02-07 12:39:46 +00:00
WANG Xuerui
695c81e8a6 [LoongArch] Implement handling of triple-implied ABIs
According to the [[ https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html | LoongArch Toolchain Conventions ]]
it is possible to specify the ABI modifier (the "D" part of "LP64D")
via the environment field in the target triple. This is needed for
proper support for Debian-style multiarch tuples as well, so add triple
awareness to `LoongArchSubtarget` via addition of
`LoongArchABI::computeTargetABI`. Let the explicit `--target-abi`
argument intuitively take precedence over the triple-implied ABI.

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D142685
2023-02-02 11:34:01 +08:00
Weining Lu
904a87ace3 [LoongArch] Use end namespace xxx style comment. NFC 2022-07-26 15:01:29 +08:00
Lu Weining
33388ae866 [LoongArch 4/6] Add basic tablegen infra for LoongArch
This patch introduces basic tablegen infra such as
LoongArch{InstrFormats,InstrInfo,RegisterInfo,CallingConv,}.td.

For now, only add instruction definitions for LoongArch basic integer
operations.
Our initial target is a working MC layer rather than codegen,
so appropriate SelectionDAG patterns will come later.

Differential revision: https://reviews.llvm.org/D115861
2022-02-10 10:23:34 +00:00