diff options
| author | Alex Bradbury <asb@lowrisc.org> | 2019-07-16 03:56:45 +0000 |
|---|---|---|
| committer | Alex Bradbury <asb@lowrisc.org> | 2019-07-16 03:56:45 +0000 |
| commit | ef8577ef98717c1c6a66293de3b2cc0f09e8c3ff (patch) | |
| tree | 5ab3e8fae296c48431ebb46ad24b71f7dc15887e /llvm/lib/Target/RISCV | |
| parent | a3c7b27419a52d612fe2cad319aafba1e226502b (diff) | |
| download | bcm5719-llvm-ef8577ef98717c1c6a66293de3b2cc0f09e8c3ff.tar.gz bcm5719-llvm-ef8577ef98717c1c6a66293de3b2cc0f09e8c3ff.zip | |
[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.
llvm-svn: 366174
Diffstat (limited to 'llvm/lib/Target/RISCV')
| -rw-r--r-- | llvm/lib/Target/RISCV/RISCVInstrInfo.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td index 6c5218ba783..b017307b461 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td @@ -886,11 +886,11 @@ def PseudoCALLReg : Pseudo<(outs GPR:$rd), (ins call_symbol:$func), []> { // Define AsmString to print "call" when compile with -S flag. // Define isCodeGenOnly = 0 to support parsing assembly "call" instruction. let isCall = 1, Defs = [X1], isCodeGenOnly = 0 in -def PseudoCALL : Pseudo<(outs), (ins call_symbol:$func), - [(riscv_call tglobaladdr:$func)]> { +def PseudoCALL : Pseudo<(outs), (ins call_symbol:$func), []> { let AsmString = "call\t$func"; } +def : Pat<(riscv_call tglobaladdr:$func), (PseudoCALL tglobaladdr:$func)>; def : Pat<(riscv_call texternalsym:$func), (PseudoCALL texternalsym:$func)>; def : Pat<(riscv_uret_flag), (URET X0, X0)>; |

