[llvm-commits] [llvm] r163648 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Benjamin Kramer
benny.kra at gmail.com
Tue Sep 11 14:05:57 PDT 2012
On 11.09.2012, at 22:57, Chad Rosier <mcrosier at apple.com> wrote:
> 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;
StringSwitch? :)
- Ben
> }
>
> X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned SegReg,
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list