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

陈荔 via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 03:49:31 PDT 2023


leecheechen created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
leecheechen added reviewers: xen0n, xry111, hev, gonglingqin, SixWeining, wangleiat.
leecheechen published this revision for review.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

The author of the following files is licongtian <licongtian at loongson.cn>:

- clang/lib/Basic/Targets/LoongArch.cpp
- llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
- llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

The files mentioned above implement InlineAsm for LSX and LASX as follows:

- Enable clang parsing LSX/LASX register name, such as $vr0.
- Support the case which operand type is 128bit or 256bit when the constraints is 'f'.
- Support the way of specifying LSX/LASX register by using constraint, such as "={$xr0}".
- Support the operand modifiers 'u' and 'w'.
- Support and legalize the data types and register classes involved in LSX/LASX in the lowering process.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154931

Files:
  clang/lib/Basic/Targets/LoongArch.cpp
  clang/test/CodeGen/LoongArch/lasx/inline-asm-gcc-regs-error.c
  clang/test/CodeGen/LoongArch/lasx/inline-asm-gcc-regs.c
  clang/test/CodeGen/LoongArch/lasx/inline-asm-operand-modifier.c
  clang/test/CodeGen/LoongArch/lsx/inline-asm-gcc-regs-error.c
  clang/test/CodeGen/LoongArch/lsx/inline-asm-gcc-regs.c
  clang/test/CodeGen/LoongArch/lsx/inline-asm-operand-modifier.c
  llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
  llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
  llvm/test/CodeGen/LoongArch/lasx/inline-asm-operand-modifier.ll
  llvm/test/CodeGen/LoongArch/lasx/inline-asm-reg-names.ll
  llvm/test/CodeGen/LoongArch/lsx/inline-asm-operand-modifier.ll
  llvm/test/CodeGen/LoongArch/lsx/inline-asm-reg-names.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154931.538968.patch
Type: text/x-patch
Size: 15546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230711/0bd233b5/attachment-0001.bin>


More information about the cfe-commits mailing list