[PATCH] D138021: [LoongArch] Support parsing la* pseudo instructions
    wanglei via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov 15 03:08:10 PST 2022
    
    
  
wangleiat created this revision.
wangleiat added reviewers: SixWeining, xen0n, xry111, gonglingqin, XiaodongLoong, 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.
This patch makes `IAS` compatible with `GAS`. It accepts `la*` pseudo
instructions. And expands `la{,.local,.global}` into different
instructions according to different features.
  Default:
      la = la.global = la.got
      la.local = la.pcrel
  With feature "+la-global-with-pcrel":
      la = la.global = la.pcrel
  With feature "+la-global-with-abs":
      la = la.global = la.abs
  With feature "+la-local-with-abs":
      la.local = la.abs
  With features "+la-global-with-pcrel,+la-global-with-abs"(disorder):
      la = la.global = la.pcrel
Note: To keep consistent with `GAS` behavior, the "la" can only have
  one register operand.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D138021
Files:
  llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
  llvm/lib/Target/LoongArch/LoongArch.td
  llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
  llvm/lib/Target/LoongArch/LoongArchSubtarget.h
  llvm/test/MC/LoongArch/Macros/aliases-la-bad.s
  llvm/test/MC/LoongArch/Macros/aliases-la.s
  llvm/test/MC/LoongArch/Macros/macros-la-bad.s
  llvm/test/MC/LoongArch/Macros/macros-la.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138021.475408.patch
Type: text/x-patch
Size: 37978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221115/7f0e8bb3/attachment-0001.bin>
    
    
More information about the llvm-commits
mailing list