mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-11 23:38:05 +00:00
implement parser support for '*' operands, as in "call *%eax".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c41938303b
commit
be9c23fef4
@ -108,7 +108,7 @@ bool AsmParser::ParseX86Operand(X86Operand &Op) {
|
|||||||
// FIXME: Decode reg #.
|
// FIXME: Decode reg #.
|
||||||
// FIXME: if a segment register, this could either be just the seg reg, or
|
// FIXME: if a segment register, this could either be just the seg reg, or
|
||||||
// the start of a memory operand.
|
// the start of a memory operand.
|
||||||
Op = X86Operand::CreateReg(0);
|
Op = X86Operand::CreateReg(123);
|
||||||
Lexer.Lex(); // Eat register.
|
Lexer.Lex(); // Eat register.
|
||||||
return false;
|
return false;
|
||||||
case asmtok::Dollar: {
|
case asmtok::Dollar: {
|
||||||
@ -119,12 +119,19 @@ bool AsmParser::ParseX86Operand(X86Operand &Op) {
|
|||||||
return TokError("expected integer constant");
|
return TokError("expected integer constant");
|
||||||
Op = X86Operand::CreateReg(Val);
|
Op = X86Operand::CreateReg(Val);
|
||||||
return false;
|
return false;
|
||||||
|
case asmtok::Star:
|
||||||
|
Lexer.Lex(); // Eat the star.
|
||||||
|
|
||||||
|
if (Lexer.is(asmtok::Register)) {
|
||||||
|
Op = X86Operand::CreateReg(123);
|
||||||
|
Lexer.Lex(); // Eat register.
|
||||||
|
} else if (ParseX86MemOperand(Op))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// FIXME: Note that these are 'dereferenced' so that clients know the '*' is
|
||||||
|
// there.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//case asmtok::Star:
|
|
||||||
// * %eax
|
|
||||||
// * <memaddress>
|
|
||||||
// Note that these are both "dereferenced".
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user