[all-commits] [llvm/llvm-project] 2cf031: [LoongArch] Move lp64s out of the unimplemented ca...
Lu Weining via All-commits
all-commits at lists.llvm.org
Tue May 16 06:11:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2cf0314029804ab467517b390f0fa2a48a34dbe7
https://github.com/llvm/llvm-project/commit/2cf0314029804ab467517b390f0fa2a48a34dbe7
Author: Weining Lu <luweining at loongson.cn>
Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths:
M llvm/docs/ReleaseNotes.rst
M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
A llvm/test/CodeGen/LoongArch/calling-conv-common.ll
M llvm/test/CodeGen/LoongArch/calling-conv-lp64d.ll
A llvm/test/CodeGen/LoongArch/calling-conv-lp64s.ll
M llvm/test/CodeGen/LoongArch/e_flags.ll
Log Message:
-----------
[LoongArch] Move lp64s out of the unimplemented calling conv list
lp64s is same as lp64d execpt that floating point arguments and return
values are always passed via GPRs or stack which means `UseGPRForFloat`
is always `true` in `CC_LoongArch` for lp64s.
One motivation of this change is to build linux which uses
`-msoft-float` and `-mabi=lp64s` [1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/Makefile?h=v6.4-rc1#n49
Reviewed By: xen0n, hev
Differential Revision: https://reviews.llvm.org/D150417
Commit: ddb27b1870691595173608ce0c4a0c70ad16513d
https://github.com/llvm/llvm-project/commit/ddb27b1870691595173608ce0c4a0c70ad16513d
Author: Weining Lu <luweining at loongson.cn>
Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/Clang.h
M clang/lib/Driver/ToolChains/Gnu.cpp
A clang/test/Driver/loongarch-as.s
A clang/test/Driver/loongarch-ias.s
Log Message:
-----------
[Clang][LoongArch] Pass the -mabi and -target-abi options to as and cc1as respectively
This change is necessary to set correct EFlags according to the
options (-m*-float and -mabi=) passed to clang when input is assembly.
Note: `-mabi=` is not documented by `as`.
```
$ as --version
GNU assembler (GNU Binutils) 2.40.50.20230316
...
$ as --target-help
LARCH options:
```
But we can see gcc invokes `as` and passes the `-mabi=` option when compiling C or assembly.
```
$ gcc -c a.c -v 2>&1 -msoft-float | grep "as -v"
as -v -mabi=lp64s -o a.o /tmp/ccFrxzZi.s
$ gcc -c a.s -v 2>&1 -msoft-float | grep "as -v"
as -v -mabi=lp64s -o a.o a.s
```
Reviewed By: xen0n
Differential Revision: https://reviews.llvm.org/D150537
Compare: https://github.com/llvm/llvm-project/compare/8f8479789a08...ddb27b187069
More information about the All-commits
mailing list