llvm.org GIT mirror llvm / f58ae5d
[ms-inline asm] Make the operand size directives case insensitive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163729 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 7 years ago
1 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
633633 /// getIntelMemOperandSize - Return intel memory operand size.
634634 static unsigned getIntelMemOperandSize(StringRef OpStr) {
635635 unsigned Size = StringSwitch(OpStr)
636 .Case("BYTE", 8)
637 .Case("WORD", 16)
638 .Case("DWORD", 32)
639 .Case("QWORD", 64)
640 .Case("XWORD", 80)
641 .Case("XMMWORD", 128)
642 .Case("YMMWORD", 256)
636 .Cases("BYTE", "byte", 8)
637 .Cases("WORD", "word", 16)
638 .Cases("DWORD", "dword", 32)
639 .Cases("QWORD", "qword", 64)
640 .Cases("XWORD", "xword", 80)
641 .Cases("XMMWORD", "xmmword", 128)
642 .Cases("YMMWORD", "ymmword", 256)
643643 .Default(0);
644644 return Size;
645645 }
743743 unsigned Size = getIntelMemOperandSize(Tok.getString());
744744 if (Size) {
745745 Parser.Lex();
746 assert (Tok.getString() == "PTR" && "Unexpected token!");
746 assert ((Tok.getString() == "PTR" || Tok.getString() == "ptr") &&
747 "Unexpected token!");
747748 Parser.Lex();
748749 }
749750