diff options
author | Evan Cheng <evan.cheng@apple.com> | 2005-12-01 00:18:45 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2005-12-01 00:18:45 +0000 |
commit | 66a48bbc3565b40ea0e6f2d58cf5e3a8e64802ef (patch) | |
tree | 581c3a92474988022c6c8de897e1b265c1078cdc /utils/TableGen/DAGISelEmitter.h | |
parent | 86193d1190b30a537415fc1c384f4e51039fab74 (diff) | |
download | external_llvm-66a48bbc3565b40ea0e6f2d58cf5e3a8e64802ef.zip external_llvm-66a48bbc3565b40ea0e6f2d58cf5e3a8e64802ef.tar.gz external_llvm-66a48bbc3565b40ea0e6f2d58cf5e3a8e64802ef.tar.bz2 |
Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
"shl{b} {%cl, $dst|$dst, %CL}",
[(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;
This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.h')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h index 404b00b..ed1e978 100644 --- a/utils/TableGen/DAGISelEmitter.h +++ b/utils/TableGen/DAGISelEmitter.h @@ -418,9 +418,12 @@ private: void EmitMatchForPattern(TreePatternNode *N, const std::string &RootName, std::map<std::string,std::string> &VarMap, unsigned PatternNo, std::ostream &OS); + void EmitCopyToRegsForPattern(TreePatternNode *N, const std::string &RootName, + std::ostream &OS, bool &InFlag); unsigned CodeGenPatternResult(TreePatternNode *N, unsigned &Ctr, std::map<std::string,std::string> &VariableMap, - std::ostream &OS, bool isRoot = false); + std::ostream &OS, bool InFlag, + bool isRoot = false); void EmitCodeForPattern(PatternToMatch &Pattern, std::ostream &OS); void EmitInstructionSelector(std::ostream &OS); }; |