llvm.org GIT mirror llvm / 6d9af5b
[RISCV][NFC] Split PseudoCALL pattern out from instruction Since PseudoCALL defines AsmString, it can be generated from assembly, and so code-gen patterns should be defined separately to be consistent with the style of the RISCV backend. Other pseudo-instructions exist that have code-gen patterns defined directly, but these instructions are purely for code-gen and cannot be written in assembly. Differential Revision: https://reviews.llvm.org/D64012 Patch by James Clarke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366174 91177308-0d34-0410-b5e6-96231b3b80d8 Alex Bradbury 3 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
885885 // Define AsmString to print "call" when compile with -S flag.
886886 // Define isCodeGenOnly = 0 to support parsing assembly "call" instruction.
887887 let isCall = 1, Defs = [X1], isCodeGenOnly = 0 in
888 def PseudoCALL : Pseudo<(outs), (ins call_symbol:$func),
889 [(riscv_call tglobaladdr:$func)]> {
888 def PseudoCALL : Pseudo<(outs), (ins call_symbol:$func), []> {
890889 let AsmString = "call\t$func";
891890 }
892891
892 def : Pat<(riscv_call tglobaladdr:$func), (PseudoCALL tglobaladdr:$func)>;
893893 def : Pat<(riscv_call texternalsym:$func), (PseudoCALL texternalsym:$func)>;
894894
895895 def : Pat<(riscv_uret_flag), (URET X0, X0)>;