[llvm-commits] [llvm] r163648 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Chad Rosier
mcrosier at apple.com
Tue Sep 11 13:57:04 PDT 2012
Author: mcrosier
Date: Tue Sep 11 15:57:04 2012
New Revision: 163648
URL: http://llvm.org/viewvc/llvm-project?rev=163648&view=rev
Log:
Simplify logic. No functional change intended.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=163648&r1=163647&r2=163648&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Sep 11 15:57:04 2012
@@ -633,15 +633,14 @@
/// getIntelMemOperandSize - Return intel memory operand size.
static unsigned getIntelMemOperandSize(StringRef OpStr) {
- unsigned Size = 0;
- if (OpStr == "BYTE") Size = 8;
- if (OpStr == "WORD") Size = 16;
- if (OpStr == "DWORD") Size = 32;
- if (OpStr == "QWORD") Size = 64;
- if (OpStr == "XWORD") Size = 80;
- if (OpStr == "XMMWORD") Size = 128;
- if (OpStr == "YMMWORD") Size = 256;
- return Size;
+ if (OpStr == "BYTE") return 8;
+ if (OpStr == "WORD") return 16;
+ if (OpStr == "DWORD") return 32;
+ if (OpStr == "QWORD") return 64;
+ if (OpStr == "XWORD") return 80;
+ if (OpStr == "XMMWORD") return 128;
+ if (OpStr == "YMMWORD") return 256;
+ return 0;
}
X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned SegReg,
More information about the llvm-commits
mailing list