[llvm] c420762 - Revert "[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment."
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 15:21:37 PDT 2020
Author: Craig Topper
Date: 2020-07-01T15:20:53-07:00
New Revision: c420762172baedada71e49447f0010c292533660
URL: https://github.com/llvm/llvm-project/commit/c420762172baedada71e49447f0010c292533660
DIFF: https://github.com/llvm/llvm-project/commit/c420762172baedada71e49447f0010c292533660.diff
LOG: Revert "[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment."
Looks like lld tests need updates too
This reverts commit 3367e9dac56024147bbd916c40bfe6a4ee61079b.
Added:
Modified:
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
llvm/test/MC/X86/align-branch-bundle.s
llvm/test/MC/X86/align-branch-pad-max-prefix.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index bf3b6bcb5463..e49ee1792373 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -1096,7 +1096,7 @@ bool X86AsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const {
// This CPU doesn't support long nops. If needed add more.
// FIXME: We could generated something better than plain 0x90.
- if (!STI.hasFeature(X86::FeatureNOPL) && !STI.hasFeature(X86::Mode64Bit)) {
+ if (!STI.getFeatureBits()[X86::FeatureNOPL]) {
for (uint64_t i = 0; i < Count; ++i)
OS << '\x90';
return true;
diff --git a/llvm/test/MC/X86/align-branch-bundle.s b/llvm/test/MC/X86/align-branch-bundle.s
index a62159943683..43dabca9e477 100644
--- a/llvm/test/MC/X86/align-branch-bundle.s
+++ b/llvm/test/MC/X86/align-branch-bundle.s
@@ -6,6 +6,7 @@
# CHECK-NEXT: 1: testq $2, %rdx
# CHECK-NEXT: 8: jne
# CHECK-NEXT: e: nop
+# CHECK-NEXT: f: nop
# CHECK-NEXT: 10: jle
.text
diff --git a/llvm/test/MC/X86/align-branch-pad-max-prefix.s b/llvm/test/MC/X86/align-branch-pad-max-prefix.s
index 9576562667ac..6cce49d55d47 100644
--- a/llvm/test/MC/X86/align-branch-pad-max-prefix.s
+++ b/llvm/test/MC/X86/align-branch-pad-max-prefix.s
@@ -10,7 +10,9 @@
# following nops, doing so would make the jmp misaligned.
# CHECK: 18: jmp
jmp bar
-# CHECK: 1d: nopl (%rax)
+# CHECK: 1d: nop
+# CHECK: 1e: nop
+# CHECK: 1f: nop
# CHECK: 20: int3
.p2align 5
int3
More information about the llvm-commits
mailing list