[PATCH] D140690: [compiler-rt][dfsan] Enable loongarch64 and add test support

2023-06-01 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. The patch will continue to be updated by @Ami-zhang Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140690/new/ https://reviews.llvm.org/D140690 ___ cfe-commits mailing list cf

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2023-05-11 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. The patch will continue to be updated by @SixWeining . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436 ___ cfe-commits mailing list

[PATCH] D140690: [compiler-rt][dfsan] Enable loongarch64 and add test support

2022-12-27 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: Sanitizers, browneee, kcc, SixWeining, xen0n, xry111, MaskRay, XiaodongLoong. Herald added subscribers: Enna1, StephenFan, dberris. Herald added a project: All. tangyouling requested review of this revision. Herald added projects: cla

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-26 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 485349. tangyouling added a comment. rebase code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139686/new/ https://reviews.llvm.org/D139686 Files: clang/lib/Driver/ToolChains/Linux.cpp clang/test/Driv

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-09 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added inline comments. Comment at: compiler-rt/test/lsan/TestCases/swapcontext.cpp:8 // Missing 'getcontext' and 'makecontext' on Android. -// UNSUPPORTED: arm,aarch64,powerpc64,android +// UNSUPPORTED: arm,aarch64,loongarch64,powerpc64,android Six

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-09 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 481533. tangyouling added a comment. - Separate leak_check_segv.cpp modification. - Add some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139686/new/ https://reviews.llvm.org/D139686 Files: cl

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-08 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added inline comments. Comment at: compiler-rt/lib/lsan/lsan_common.cpp:281 +# elif defined(__loongarch_lp64) + return ((p >> 47) == 0); # else xen0n wrote: > tangyouling wrote: > > xen0n wrote: > > > Since our VM layout is actually flexible, woul

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-08 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added inline comments. Comment at: compiler-rt/lib/lsan/lsan_common.cpp:281 +# elif defined(__loongarch_lp64) + return ((p >> 47) == 0); # else xen0n wrote: > Since our VM layout is actually flexible, would it be better to document > this, like "

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-08 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. $ cat memory-leak.c #include void *p; int main() { p = malloc(7); p = 0; // The memory is leaked here. return 0; } $ ./build/bin/clang -fsanitize=address -g memory-leak.c ; ASAN_OPTIONS=detect_leaks=1 ./a.out ===

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-08 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: Sanitizers, vitalybuka, SixWeining, xen0n, xry111, MaskRay, XiaodongLoong, lixing-star. Herald added subscribers: Enna1, StephenFan, s.egerton, simoncook. Herald added a project: All. tangyouling requested review of this revision. Her

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-05 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 480044. tangyouling added a comment. Use C-style one-line comments //. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolChains/Linux.

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-04 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 479980. tangyouling added a comment. Add glibc version comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolChains/Linux.cpp

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-27 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 478124. tangyouling added a comment. Add the missing $t0-$t8 in internal_clone(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolCh

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-25 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 477901. tangyouling added a comment. - Fixed the ThreadDescriptorSize calculation on loongarch64. - Use `__loongarch_lp64` to distinguish loongarch64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-23 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:269 val = FIRST_32_SECOND_64(1152, 1776); +#elif SANITIZER_LOONGARCH64 + val = 1936; MaskRay wrote: > We should add new code in this fallback function.

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1513 + + register int res __asm__("$a0"); + register int __flags __asm__("$a0") = flags; SixWeining wrote: > I'm not sure if this is necessary. Maybe `int res;` is

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. $ make check-tsan -j4 Testing Time: 78.34s Unsupported : 91 Passed : 345 Expectedly Failed: 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: vitalybuka, dvyukov, melver, SixWeining, xen0n, xry111, MaskRay, lixing-star, MQ-mengqing, XiaodongLoong. Herald added subscribers: Enna1, StephenFan, s.egerton, simoncook. Herald added a project: All. tangyouling requested review of

[PATCH] D138350: [scudo] Add loongarch64 support for scudo

2022-11-18 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: cryptoad, eugenis, SixWeining, xen0n, xry111, MaskRay. Herald added subscribers: Enna1, StephenFan. Herald added a project: All. tangyouling requested review of this revision. Herald added projects: clang, Sanitizers. Herald added sub

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. In D136436#3898394 , @SixWeining wrote: > In D136436#3898392 , @tangyouling > wrote: > >> Is it acceptable to add the `non-prefix $`? if not, an alternative fix for >> the build fai

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. Is it acceptable to add the `non-prefix $`? if not, an alternative fix for the build failure is to add the `prefix $` in sanitizer_syscall_linux_loongarch64.inc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-27 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. In D136436#3890737 , @SixWeining wrote: > In D136436#3881382 , @MaskRay wrote: > >> In D136436#3876684 , @SixWeining >> wrote: >> >>> In D13

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-23 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. In D136436#3873938 , @xen0n wrote: > Commit message is unclear. You added non-prefixed aliases for all registers, > yet only `$a0` is mentioned. I'd like to see what improvement you could come > up with before amending it my

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-23 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 470028. tangyouling added a comment. Modify commit information and add missing `s9`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436 Files: clang/lib/Basic/Targ

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-21 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. $ cat prefix_regalias.c int main() { register unsigned long a0 asm("a0"); register unsigned long a1 asm("$a1"); register unsigned long a2 asm("r6"); register unsigned long a3 asm("$r7"); register float f0 asm("fa0");

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-21 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: SixWeining, xen0n, xry111, MaskRay, wangleiat. Herald added subscribers: jeroen.dobbelaere, StephenFan. Herald added a project: All. tangyouling requested review of this revision. Herald added a project: clang. Herald added a subscribe

[PATCH] D136413: [Clang][LoongArch] Define more LoongArch specific built-in macros

2022-10-20 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. Do we need to add the definition of the `__loongarch64` macro? gcc has that definition (but it is not recommended to use it, just for compatibility with previous code). It has been used in some projects before, such as linux kernel, libunwind etc. Repository: rG