summaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-02-07 19:38:32 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-02-07 19:38:32 +0000
commit2315beba244339dfa41a82dabb0bb5d7959f725b (patch)
treed0cb34d3d3dbf45cd42b5f08a7f4f9ca98b64764 /lldb/source/Interpreter/ScriptInterpreterPython.cpp
parent79651c527b8eb48d5af92a16030660e2c2044a97 (diff)
Implement support for custom target specific asm parsing of operands.
Motivation: Improve the parsing of not usual (different from registers or immediates) operand forms. This commit implements only the generic support. The ARM specific modifications will come next. A table like the one below is autogenerated for every instruction containing a 'ParserMethod' in its AsmOperandClass static const OperandMatchEntry OperandMatchTable[20] = { /* Mnemonic, Operand List Mask, Operand Class, Features */ { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 }, { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM }, A matcher function very similar (but lot more naive) to MatchInstructionImpl scans the table. After the mnemonic match, the features are checked and if the "to be parsed" operand index is present in the mask, there's a real match. Then, a switch like the one below dispatch the parsing to the custom method provided in 'ParseMethod': case MCK_Coproc: return TryParseCoprocessorOperandName(Operands); llvm-svn: 125030
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions