forked from OSchip/llvm-project
[BOLT] Emit long nops by default
Summary: Change our X86 target to use long nops by default. In general, BOLT does not put nops into the instruction stream that is going to be executed, since it doesn't align basic blocks, only functions. Since we rebased BOLT, our relationship with MCAssembler changed because it stopped using multibyte nops and we never needed to revisit that. But it makes a difference if we want to mitigate perf issues with the Intel JCC erratum, since the nops inserted are going to be decoded and executed. To make MCAssembler emit long nops again, we need to explictly set mattr (Features) of the X86 target. (cherry picked from FBD19987277)
This commit is contained in:
parent
9711286858
commit
a9d85413ac
|
@ -160,6 +160,7 @@ BinaryContext::createBinaryContext(ObjectFile *File, DataReader &DR,
|
|||
switch (File->getArch()) {
|
||||
case llvm::Triple::x86_64:
|
||||
ArchName = "x86-64";
|
||||
FeaturesStr = "+nopl";
|
||||
break;
|
||||
case llvm::Triple::aarch64:
|
||||
ArchName = "aarch64";
|
||||
|
|
Loading…
Reference in New Issue