[all-commits] [llvm/llvm-project] b1f4f0: [LLDB][LoongArch] Delete the s9 register alias def...
Lu Weining via All-commits
all-commits at lists.llvm.org
Fri Jan 13 17:24:37 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b1f4f06dede54627c546d0e7f21e7e72295f280b
https://github.com/llvm/llvm-project/commit/b1f4f06dede54627c546d0e7f21e7e72295f280b
Author: Hui Li <lihui at loongson.cn>
Date: 2023-01-14 (Sat, 14 Jan 2023)
Changed paths:
M lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h
M lldb/source/Plugins/Process/Utility/lldb-loongarch-register-enums.h
M lldb/source/Utility/LoongArch_DWARF_Registers.h
Log Message:
-----------
[LLDB][LoongArch] Delete the s9 register alias definition
In RegisterInfos_loongarch64.h, r22 is defined twice. Having an extra array
member causes problems reading and writing registers defined after r22. So,
for r22, keep the alias fp, delete the s9 alias.
The PC register is incorrectly accessed when the step command is executed.
The step command behavior is incorrect.
This test reflects this problem:
```
loongson at linux:~$ cat test.c
#include <stdio.h>
int func(int a) {
return a + 1;
}
int main(int argc, char const *argv[]) {
func(10);
return 0;
}
loongson at linux:~$ clang -g test.c -o test
```
Without this patch:
```
loongson at linux:~$ llvm-project/llvm/build/bin/lldb test
(lldb) target create "test"
Current executable set to '/home/loongson/test' (loongarch64).
(lldb) b main
Breakpoint 1: where = test`main + 40 at test.c:8:3, address = 0x0000000120000668
(lldb) r
Process 278049 launched: '/home/loongson/test' (loongarch64)
Process 278049 stopped
* thread #1, name = 'test', stop reason = breakpoint 1.1
frame #0: 0x0000000120000668 test`main(argc=1, argv=0x00007fffffff72a8) at test.c:8:3
5 }
6
7 int main(int argc, char const *argv[]) {
-> 8 func(10);
9 return 0;
10 }
11
(lldb) s
Process 278049 stopped
* thread #1, name = 'test', stop reason = step in
frame #0: 0x0000000120000670 test`main(argc=1, argv=0x00007fffffff72a8) at test.c:9:3
6
7 int main(int argc, char const *argv[]) {
8 func(10);
-> 9 return 0;
10 }
```
With this patch:
```
loongson at linux:~$ llvm-project/llvm/build/bin/lldb test
(lldb) target create "test"
Current executable set to '/home/loongson/test' (loongarch64).
(lldb) b main
Breakpoint 1: where = test`main + 40 at test.c:8:3, address = 0x0000000120000668
(lldb) r
Process 278632 launched: '/home/loongson/test' (loongarch64)
Process 278632 stopped
* thread #1, name = 'test', stop reason = breakpoint 1.1
frame #0: 0x0000000120000668 test`main(argc=1, argv=0x00007fffffff72a8) at test.c:8:3
5 }
6
7 int main(int argc, char const *argv[]) {
-> 8 func(10);
9 return 0;
10 }
11
(lldb) s
Process 278632 stopped
* thread #1, name = 'test', stop reason = step in
frame #0: 0x0000000120000624 test`func(a=10) at test.c:4:10
1 #include <stdio.h>
2
3 int func(int a) {
-> 4 return a + 1;
5 }
```
Reviewed By: SixWeining, DavidSpickett
Differential Revision: https://reviews.llvm.org/D140615
Commit: b7ae5762a110ee7c28b218b4ed4e3e24b2b3c64d
https://github.com/llvm/llvm-project/commit/b7ae5762a110ee7c28b218b4ed4e3e24b2b3c64d
Author: Hui Li <lihui at loongson.cn>
Date: 2023-01-14 (Sat, 14 Jan 2023)
Changed paths:
M lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
M lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h
M lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp
Log Message:
-----------
[LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch
Add floating-point branch Instructions for EmulateInstructionLoongArch and
add relevant unit tests.
Without this patch:
```
$ ninja check-lldb-unit
[0/1] Running lldb unit test suite
Testing Time: 10.45s
Passed: 1044
```
With this patch:
```
$ ninja check-lldb-unit
[0/1] Running lldb unit test suite
Testing Time: 10.20s
Passed: 1048
```
Reviewed By: SixWeining, MaskRay, DavidSpickett
Differential Revision: https://reviews.llvm.org/D140759
Commit: 3a58e11961d873bd9de1023cd248a4ffff03926d
https://github.com/llvm/llvm-project/commit/3a58e11961d873bd9de1023cd248a4ffff03926d
Author: Youling Tang <tangyouling at loongson.cn>
Date: 2023-01-14 (Sat, 14 Jan 2023)
Changed paths:
M clang/lib/Driver/ToolChains/Linux.cpp
M clang/test/Driver/fsanitize.c
M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
M compiler-rt/lib/lsan/lsan_common.cpp
M compiler-rt/lib/lsan/lsan_common.h
M compiler-rt/test/asan/lit.cfg.py
M compiler-rt/test/lsan/TestCases/swapcontext.cpp
M compiler-rt/test/lsan/TestCases/use_registers.cpp
M compiler-rt/test/lsan/lit.common.cfg.py
Log Message:
-----------
[lsan] Add lsan support for loongarch64
This patch enabled lsan for loongarch64 with 47-bit VMA layout.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D139686
Compare: https://github.com/llvm/llvm-project/compare/292019e931a0...3a58e11961d8
More information about the All-commits
mailing list