[PATCH] D25288: [X86] Fix intel syntax push parsing bug
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 14:08:27 PDT 2016
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Looks terrible, please commit =(
Every time someone touches the X86 assembler I swear that this is the last straw, after this one fix we have to rewrite it from the ground up, but we just keep deferring it.
> X86AsmParser.cpp:2805-2808
> + (isIntN(Size, CE->getValue()) || isUIntN(Size, CE->getValue()))) {
> + SmallString<16> Tmp;
> + Tmp += Base;
> + Tmp += (is64BitMode())
IMO this is simpler:
char Tmp[] = "push ";
switch (getPointerWidth()) {
case 16: Tmp[4] = 'w'; break;
case 32: Tmp[4] = 'l'; break;
case 64: Tmp[4] = 'q'; break;
}
https://reviews.llvm.org/D25288
More information about the llvm-commits
mailing list