[llvm-branch-commits] [llvm-branch] r323770 - Merging r323469:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jan 30 07:22:32 PST 2018
Author: hans
Date: Tue Jan 30 07:22:31 2018
New Revision: 323770
URL: http://llvm.org/viewvc/llvm-project?rev=323770&view=rev
Log:
Merging r323469:
------------------------------------------------------------------------
r323469 | ctopper | 2018-01-25 22:23:57 +0100 (Thu, 25 Jan 2018) | 3 lines
[X86] Teach Intel syntax InstPrinter to print lock prefixes that have been parsed from the asm parser.
The asm parser puts the lock prefix in the MCInst flags so we need to check that in addition to TSFlags. This matches what the ATT printer does.
------------------------------------------------------------------------
Modified:
llvm/branches/release_60/ (props changed)
llvm/branches/release_60/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
llvm/branches/release_60/test/MC/X86/x86-32-coverage.s
Propchange: llvm/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 30 07:22:31 2018
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322016,322053,322056,322103,322106,322108,322123,322131,322223,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322900,322904-322905,322973,322993,323034,323190,323307,323331,323355,323369,323371,323384,323582,323671-323672,323710
+/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322016,322053,322056,322103,322106,322108,322123,322131,322223,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322900,322904-322905,322973,322993,323034,323190,323307,323331,323355,323369,323371,323384,323469,323582,323671-323672,323710
Modified: llvm/branches/release_60/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp?rev=323770&r1=323769&r2=323770&view=diff
==============================================================================
--- llvm/branches/release_60/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp (original)
+++ llvm/branches/release_60/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp Tue Jan 30 07:22:31 2018
@@ -39,11 +39,11 @@ void X86IntelInstPrinter::printInst(cons
const MCSubtargetInfo &STI) {
const MCInstrDesc &Desc = MII.get(MI->getOpcode());
uint64_t TSFlags = Desc.TSFlags;
+ unsigned Flags = MI->getFlags();
- if (TSFlags & X86II::LOCK)
+ if ((TSFlags & X86II::LOCK) || (Flags & X86::IP_HAS_LOCK))
OS << "\tlock\t";
- unsigned Flags = MI->getFlags();
if (Flags & X86::IP_HAS_REPEAT_NE)
OS << "\trepne\t";
else if (Flags & X86::IP_HAS_REPEAT)
Modified: llvm/branches/release_60/test/MC/X86/x86-32-coverage.s
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/MC/X86/x86-32-coverage.s?rev=323770&r1=323769&r2=323770&view=diff
==============================================================================
--- llvm/branches/release_60/test/MC/X86/x86-32-coverage.s (original)
+++ llvm/branches/release_60/test/MC/X86/x86-32-coverage.s Tue Jan 30 07:22:31 2018
@@ -10774,3 +10774,9 @@ btcl $4, (%eax)
// CHECK: clzero
// CHECK: encoding: [0x0f,0x01,0xfc]
clzero
+
+// CHECK: lock addl %esi, (%edi)
+// INTEL: lock add dword ptr [edi], esi
+// CHECK: encoding: [0xf0,0x01,0x37]
+ lock add %esi, (%edi)
+
More information about the llvm-branch-commits
mailing list