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

2022-10-20 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. I've formatted the patch summary for you. Please familiarize yourself with Markdown syntax so next time your rendering would look better. In D136413#3873317 , @tangyouling wrote: > Do we need to add the definition of the `__loong

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

2022-10-21 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. 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 myself, to hopefully make you better at writing those "small compositions".

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

2022-10-21 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. In D136436#3873949 , @SixWeining wrote: > How about the asm code in `.s`? Do we need to support `addi.d a0, a1, a2`? For the assembler part of this support, I think we need to coordinate with the GNU toolchain maintainers of Loon

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

2022-10-27 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. In D136436#3890737 , @SixWeining wrote: > In D136436#3881382 , @MaskRay wrote: > >> In D136436#3876684 , @SixWeining >> wrote: >> >>> In D136436#3

[PATCH] D136841: [LoongArch] Support inline asm operand modifier 'z'

2022-10-29 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Inching closer to ClangBuiltLinux on LoongArch it seems! Comment at: llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp:64 + break; + // TODO: handle other extra codes

[PATCH] D136841: [LoongArch] Support inline asm operand modifier 'z'

2022-10-29 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Ah. There's a typo in the name of the testcase file... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136841/new/ https://reviews.llvm.org/D136841 ___ cfe-commits mailing list cfe-c

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

2022-10-30 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Amended the patch summary a little for grammatical fixes and mentioning `__loongarch64` too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136413/new/ https://reviews.llvm.org/D136413 ___

[PATCH] D136146: [Clang][LoongArch] Handle -march/-m{single,double,soft}-float/-mfpu options

2022-10-30 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Looks good LoongArch-wise but I'm not very familiar with Clang internals to start with. Might be okay to land since this touches little code outside LoongArch and has passed tests. Repository:

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-08-21 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2236 + static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const LoongArch64Triples

[PATCH] D134157: [LoongArch] Add inline asm support for constraints f/l/I/K

2022-09-21 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. I don't know if the clang changes should be split into its own commit (or the title of this commit amended to mention `[Clang]` but I don't know if this is appropriate), but the rest looks reasonable. Comment at: llvm/test/CodeGen/LoongArch/inline-asm-c

[PATCH] D134638: [Clang][LoongArch] Add inline asm support for constraints k/m/ZB/ZC

2022-09-26 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. The test cases look good to me. We should be pretty close to passing `ninja check` natively. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D134638: [Clang][LoongArch] Add inline asm support for constraints k/m/ZB/ZC

2022-09-29 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. The previous test results (with some of my WIP patches but unrelated to this) before the fix: Failed Tests (6): LLVM :: CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll LLVM :: CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll LLVM :: CodeGen/Generic/

[PATCH] D140685: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions

2022-12-27 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. > MOVGR2FCSR modifies the value of the software writable field > corresponding to the FCSR (floating-point control and status > register) fcsr according to the value of the lower 32 bits of > the GR (general purpose register) rj. The description of `movgr2fcsr` is incorrect

[PATCH] D140685: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions

2023-01-03 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. In D140685#4017381 , @xen0n wrote: >> MOVGR2FCSR modifies the value of the software writable field >> corresponding to the FCSR (floating-point control and status >> register) fcsr according to the valu

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-01-26 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n created this revision. xen0n added reviewers: SixWeining, wangleiat, MaskRay, xry111. Herald added a project: All. xen0n requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This follows v1.00 of the LoongArch Toolchain Conventions

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-01-31 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 493796. xen0n added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142688/new/ https://reviews.llvm.org/D142688 Files: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp clang/lib/Driver/ToolCha

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-01-31 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:41 /// so we provide a rough mapping here. std::string Linux::getMultiarchTriple(const Driver &D, const llvm::Triple &TargetTriple, SixWeining

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-01-15 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n created this revision. xen0n added reviewers: SixWeining, wangleiat, gonglingqin, MaskRay, xry111. Herald added subscribers: luismarques, s.egerton, PkmX, simoncook, hiraditya, arichardson. Herald added a reviewer: aaron.ballman. Herald added a project: All. xen0n requested review of this re

[PATCH] D141248: [Clang] [Python] Fix tests when default config file contains -include

2023-01-22 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: clang/bindings/python/tests/cindex/util.py:82 +# our tests. +os.environ["CLANG_NO_DEFAULT_CONFIG"] = "1" This is essentially an import-time side effect, IMO it could be better to instead put the envvar provision in `cl

[PATCH] D154931: [LoongArch] Support InlineAsm for LSX and LASX

2023-07-23 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. Seems the `u` and `w` modifiers are strictly an implementation detail that's different from ordinary inline asm constraints, so even though they take up precious single-letter namespace I'd be fine. Given the architecture-specific nature of t

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-07-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. So this one is different than D151298 (I'm very glad that those registers are ultimately saved btw), and solves a real problem. Thanks for the timely catch before LLVM 17 ;-) Repository: rG LLVM Github Mo

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. In D155824#4530474 , @SixWeining wrote: > @xen0n Do you have any inputs? I think supporting these options can improve > compatibility with gcc (although there is no ScheduleModel difference among > currently supported processors)

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Thank you (and your team, and of course other friends) for all your work this cycle! Comment at: llvm/docs/ReleaseNotes.rst:202-203 +* Adds assembler/disassembler support for the ``LSX``, ``LASX``, ``LVZ`` and + ``LBT`` ISA extensions. * The ``lp64s`

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156195/new/ https://reviews.llvm.org/D156195

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Overall LGTM except one small nit, thanks! Comment at: clang/docs/ReleaseNotes.rst:902 like GCC does. +- Adds support for the ``-march=native`` and ``-mtune=`` options and t

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-03 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:199-204 + // Handle CPU name is 'native'. + if (CPU == "native") { +CPU = llvm::sys::getHostCPUName(); +if (CPU == "generic") + CPU = llvm::LoongArch::getDefaultArch(Triple.isLo

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. This still LGTM, @steven_wu would you please take another look so this can get re-landed if confirmed working? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-07 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:22-25 + RN_T0 = 0xC, + RN_T1 = 0xD, + RN_RA = 0x1, + RN_SP = 0x3, I think people usually just declare the register ABI names with decimal numbers for readability? This is min

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Thanks for following up with the suggestions. This now looks mostly okay to me; let's wait for more people to chip in! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Ah, the patch summary probably needs some update as well. We no longer care about version 0 and the backend changes for `R_LARCH_64_PCREL` are already in, for example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140727/new

[PATCH] D138418: [LoongArch] Add remaining intrinsics for CRC check instructions

2022-11-22 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. otherwise LGTM Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:925 llvm_unreachable("Unexpected Intrinsic."); -case Intrinsic::loongarch_crc_w_d_w: { - Results.push_back(DAG.getNode( - ISD::TRUNCATE, DL, N->getValu

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Trivial enough (`$a0` and `$a1` respectively, same as RISCV and Mips). Thanks for the quick fixing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D152671: [doc][LoongArch] Add missed release note about `ual` feature addition

2023-06-21 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Thanks for the catch! Comment at: llvm/docs/ReleaseNotes.rst:163 * The ``lp64s`` ABI is supported now and has been tested on Rust bare-matal target. +* An target feature ``ual`` is introduced to allow unaligned memory accesses and + this feature is en

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n created this revision. xen0n added reviewers: SixWeining, wangleiat, hev, xry111, MaskRay. Herald added a subscriber: tpr. Herald added a project: All. xen0n requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This kind of CLI flags dupli

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534241. xen0n added a comment. Fix faulty refactor (unintended always-error case). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707 Files: clang/include/clang/Basic/Di

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534325. xen0n added a comment. Refactored to reduce duplication of flag processing logic and save one level of indent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:64 +// conflicts with the higher-priority settings implied by -m*-float. +if (!ImpliedABI.empty()) { + if (const Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) {

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534326. xen0n marked an inline comment as done. xen0n added a comment. Grammatical fix of comment text ("is" -> "are"). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534365. xen0n added a comment. Address @MaskRay's review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707 Files: clang/include/clang/Basic/DiagnosticDriverKi

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n marked 2 inline comments as done. xen0n added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:732 +def warn_drv_loongarch_conflicting_mabi : Warning< + "the -mabi setting '%0' conflicts with that implied by -m*-float (%1); using %1">, + In

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534427. xen0n marked an inline comment as done. xen0n added a comment. Unify the diagnostic messages and show the actual `-m*-float` option being passed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534430. xen0n added a comment. Refactor more to be able to show the exact `-mabi` and `-mfpu` argument given. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707 Files: c

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 510320. xen0n added a comment. Rebase and reflect the Toolchain Conventions change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142688/new/ https://reviews.llvm.org/D142688 Files: clang/lib/Driver/ToolChains

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n marked 5 inline comments as done. xen0n added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:66 + default: +return IsLA32 ? "ilp32d" : "lp64d"; + } xry111 wrote: > SixWeining wrote: > > Better to be `f`? (Probably most 32-

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 510333. xen0n marked an inline comment as done. xen0n added a comment. Rebase and add tests, also use Twine for concatenating strings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142688/new/ https://reviews.llvm

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n marked 2 inline comments as done. xen0n added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:41 /// so we provide a rough mapping here. std::string Linux::getMultiarchTriple(const Driver &D, const llvm::Triple &Ta

[PATCH] D151298: [clang][LoongArch] Fix the calling convention for empty struct in C++ mode

2023-05-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. FYI, in the matching GCC patch discussion it was suggested that such a treatment wouldn't be necessary in principle. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-06-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. I've thought about this a bit harder; it now seems better longer-term to enable unaligned accesses by default (making the UAL-less models the special case). But most importantly, there's new inf

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-02-06 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: llvm/lib/Target/LoongArch/LoongArchMCInstLower.cpp:150 + .getAsInteger(10, Num)) +return false; + AP.emitNops(Num); SixWeining wrote: > Seems should return `true`? Consider when verifier is disabl

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-02-15 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 497596. xen0n added a comment. Rebase and change to lower the op in LoongArchAsmPrinter so as to make people's lives easier when they come to rebase D141785 on top of this. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-02-15 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 497598. xen0n added a comment. Document the change in Clang release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141785/new/ https://reviews.llvm.org/D141785 Files: clang/docs/ReleaseNotes.rst clang/i

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-06 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. From a LoongArch developer's perspective, it may be better to only enable UAL for LA464 and other supporting models, instead of for the generic `loongarch64` model too. This is because although all server- and desktop-class LoongArch models have UAL, the embedded-class (L

[PATCH] D150089: [LoongArch] Support fcc* (condition flag) registers in inlineasm clobbers

2023-05-08 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. It's confirmed offline that LA32 also has 8 `$fcc`'s, so the existing assumption holds, and the code changes are correct. (Apparently the "LA32 Reduced" subset is not supported right now, which only has one `$fcc0`.) Repository: rG LLVM Gi

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

2023-05-11 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. LGTM now, thanks for updating this patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-19 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: clang/test/Driver/linux-header-search.cpp:247 // +// Check header search on Debian loong64 +// RUN: %clang -### %s -fsyntax-only 2>&1 \ SixWeining wrote: > Better to use “loongarch64” when talking about debian? Refer > h

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

2023-05-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Hi, any update on this? Given the `$`-less style has been long established at this time, and present in released GCC versions, it seems we indeed have to follow suit (and later make GCC accept ABI names for FPRs too). It will also make the ClangBuiltLinux work easier. R

[PATCH] D139288: [Clang][LoongArch] Add intrinsic for csrrd, csrwr and csrxchg

2022-12-04 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. You'll also need the IOCSR intrinsics too for building Linux. Since they're very similar to some of the CSR intrinsics you added here, do you plan to add support for them later here or in a separate follow-up change? Comment at: clang/lib/Headers/larchi

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

2022-12-08 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: compiler-rt/lib/lsan/lsan_common.cpp:281 +# elif defined(__loongarch_lp64) + return ((p >> 47) == 0); # else Since our VM layout is actually flexible, would it be better to document this, like "Support only the most c

[PATCH] D139612: [Clang][LoongArch] Add intrinsic for iocsrrd and iocsrwr

2022-12-08 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. This should be good enough (reminiscent of CSR ops) but let's wait for other reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139612/new/

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

2022-12-08 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added inline comments. Comment at: compiler-rt/lib/lsan/lsan_common.cpp:281 +# elif defined(__loongarch_lp64) + return ((p >> 47) == 0); # else tangyouling wrote: > xen0n wrote: > > Since our VM layout is actually flexible, would it be better to documen

[PATCH] D139915: [Clang][LoongArch] Add intrinsic for asrtle, asrtgt, lddir, ldpte and cpucfg

2022-12-12 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n added a comment. Linux only requires `__cpucfg` among the ones you just added. Please amend the patch summary so it's more accurate. Otherwise LGTM, thanks! Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:797 +ASRT_LE_GT_CASE(asrtle_d) +ASRT_LE_G