aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-30 17:59:25 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-30 17:59:25 +0000
commit738ea2590ffde414777efe26bffd27d97f5cc351 (patch)
tree77653967c7d4ec24df0559b220a708cf4fcbbc0e /clang/lib/Frontend/CompilerInvocation.cpp
parentbbd10792c2deefec6625981d0fc08d2560abcb04 (diff)
downloadllvm-738ea2590ffde414777efe26bffd27d97f5cc351.zip
llvm-738ea2590ffde414777efe26bffd27d97f5cc351.tar.gz
llvm-738ea2590ffde414777efe26bffd27d97f5cc351.tar.bz2
[ms-inline asm] Add a new function, GetMCInstOperandNum, to the
AsmMatcherEmitter. This function maps inline assembly operands to MCInst operands. For example, '__asm mov j, eax' is represented by the follow MCInst: <MCInst 1460 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> <MCOperand Expr:(j)> <MCOperand Reg:0> <MCOperand Reg:43>> The first 5 MCInst operands are a result of j matching as a memory operand consisting of a BaseReg (Reg:0), MemScale (Imm:1), MemIndexReg(Reg:0), Expr (Expr:(j), and a MemSegReg (Reg:0). The 6th MCInst operand represents the eax register (Reg:43). This translation is necessary to determine the Input and Output Exprs. If a single asm operand maps to multiple MCInst operands, the index of the first MCInst operand is returned. Ideally, it would return the operand we really care out (i.e., the Expr:(j) in this case), but I haven't found an easy way of doing this yet. llvm-svn: 162920
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions