[llvm] r318023 - [X86] Limit NOPs to 7 bytes when 'slm' is spelled 'silvermont'.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 00:17:31 PST 2017
Author: ctopper
Date: Mon Nov 13 00:17:30 2017
New Revision: 318023
URL: http://llvm.org/viewvc/llvm-project?rev=318023&view=rev
Log:
[X86] Limit NOPs to 7 bytes when 'slm' is spelled 'silvermont'.
We support 2 spelling for silvermont and we should accept both here.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
llvm/trunk/test/MC/X86/x86_long_nop.s
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp?rev=318023&r1=318022&r2=318023&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Mon Nov 13 00:17:30 2017
@@ -76,7 +76,7 @@ class X86AsmBackend : public MCAsmBacken
public:
X86AsmBackend(const Target &T, StringRef CPU)
: MCAsmBackend(), CPU(CPU),
- MaxNopLength((CPU == "slm") ? 7 : 15) {
+ MaxNopLength((CPU == "slm" || CPU == "silvermont") ? 7 : 15) {
HasNopl = CPU != "generic" && CPU != "i386" && CPU != "i486" &&
CPU != "i586" && CPU != "pentium" && CPU != "pentium-mmx" &&
CPU != "i686" && CPU != "k6" && CPU != "k6-2" && CPU != "k6-3" &&
Modified: llvm/trunk/test/MC/X86/x86_long_nop.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_long_nop.s?rev=318023&r1=318022&r2=318023&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86_long_nop.s (original)
+++ llvm/trunk/test/MC/X86/x86_long_nop.s Mon Nov 13 00:17:30 2017
@@ -3,6 +3,7 @@
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=x86_64-apple-darwin10.0 %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-apple-darwin8 %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=slm %s | llvm-objdump -d -no-show-raw-insn - | FileCheck --check-prefix=LNOP7 %s
+# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=silvermont %s | llvm-objdump -d -no-show-raw-insn - | FileCheck --check-prefix=LNOP7 %s
# RUN: llvm-mc -filetype=obj -arch=x86 -triple=i686-pc-linux-gnu -mcpu=lakemont %s | llvm-objdump -d -no-show-raw-insn - | FileCheck --check-prefix=NOP1 %s
# Ensure alignment directives also emit sequences of 15-byte NOPs on processors
More information about the llvm-commits
mailing list