[PATCH] D78276: [X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part II)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 15:37:53 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1396
- bool Rex = false;
- emitPrefixImpl(CurOp, CurByte, Rex, MI, STI, OS);
+ bool HasREX = static_cast<bool>(emitPrefixImpl(CurOp, CurByte, MI, STI, OS));
----------------
skan wrote:
> craig.topper wrote:
> > Why not return it as a bool from emitREXPrefix?
> To myself, it seems more nature to return a `REX` ... . I am not sure if furture instruction's encoding will depends on the value of `REX`. Do you mean it is better to return `REX` as bool?
Nothing looks at the value, the presence of REX is all that is important so we should just return HasREX. I"m not very concerned that we're going to need to know the value of the REX prefix in the future.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78276/new/
https://reviews.llvm.org/D78276
More information about the llvm-commits
mailing list