[PATCH] D138086: [LoongArch] AsmParser support for the li.[wd] pseudo instructions

wanglei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 19:44:08 PST 2022


wangleiat created this revision.
wangleiat added reviewers: SixWeining, xen0n, xry111, gonglingqin, MaskRay.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
wangleiat requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The `li.[wd]` pseudo instructions are used to load an immediate value
into a GPR. These expand directly during asm parsing. As the result,
only real MC instructions are emitted to the MCStreamer. The actual
expansion to real instructions is similar to the expansion performed by
the GAS.

Note: The `li.w` always treats the imm operand as a 32-bit signed value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138086

Files:
  llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
  llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
  llvm/test/MC/LoongArch/Macros/macros-li-bad.s
  llvm/test/MC/LoongArch/Macros/macros-li.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138086.475667.patch
Type: text/x-patch
Size: 7121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221116/6c366f9d/attachment.bin>


More information about the llvm-commits mailing list