[PATCH] D82826: [X86] support .nops directive

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 10:18:26 PDT 2020


nickdesaulniers added a comment.

If `NopSize` is basically equivalent for `NumBytes` except for 2 cases, then I'd do:

  if (!NopSize) {
    print_some_error();
    return;
  }
  unsigned NopSize = NumBytes;
  switch (NumBytes) {
  ...
  default:
    NopSize = 10;
    ...
  }

So that you don't have to assign `NopSize = NumBytes` for each other case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82826/new/

https://reviews.llvm.org/D82826





More information about the llvm-commits mailing list